Skip to content

TypeError: Instance and class checks can only be used with @runtime_checkable protocols #187

Closed as not planned
@RafikBellahsene-it

Description

@RafikBellahsene-it

Hello I am facing this issue since this morning. The code was working good, it stopped to work suddenly

dataframe = dataframe.withColumn(joiningColumn[0],decode(col(joiningColumn[0]),'UTF-8'))
149 .withColumn(joiningColumn[1],decode(col(joiningColumn[1]),'UTF-8'))
151 warning_df = GreatExpectationsAnalyser(self.spark,dataframe).convertToGEObject()
152 .expect_column_values_to_be_in_set(joiningColumn[0],
--> 153 list(dataframe.where(col(joiningColumn[1]).isNotNull()).select(joiningColumn[1]).distinct().toPandas()[joiningColumn[1]]),

The exception is raised by

File /databricks/python/lib/python3.9/site-packages/typing_extensions.py:584, in _ProtocolMeta.subclasscheck(cls, other)
576 if (
577 getattr(cls, '_is_protocol', False)
578 and not cls.callable_proto_members_only
579 and not _allow_reckless_class_checks(depth=3)
580 ):
581 raise TypeError(
582 "Protocols with non-method members don't support issubclass()"
583 )
--> 584 return super().subclasscheck(other)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions