-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Instance and class checks can only be used with @runtime_checkable protocols #187
Comments
Hi @RafikBellahsene-it! Would you be able to provide us with a minimal, reproducible example for this exception? Some instructions here: https://stackoverflow.com/help/minimal-reproducible-example. Without it, it's hard for us to figure out exactly what might be causing this exception. Please also put triple-backticks around your code, like this, to ensure that GitHub formats it correctly:
|
I'm still trying to get a small reproducible example for you, but the issue I'm seeing is the same Hope that makes sense, I've been failing at making a small reproducible example but will keep trying. @RafikBellahsene-it if you run |
If you're calling Previously, there were situations where we previously failed to consistently raise an exception. This didn't match the behaviour of the The change to |
Hey we're getting same, suspect it's a conflict with
Happy to make new ticket if appropriate. |
@elena, that's a separate error message and a separate issue, which has already been reported and fixed. Please see pydantic/pydantic#5821 (and #179). You should be able to fix it by pinning pydantic>=1.10.8. |
@AlexWaygood tyty |
@AlexWaygood Sorry, I've been busy. Still haven't gotten you a reproducible example. I understand when I need to add
That's all the info I have now though. Hopefully early next week I can have a small example. |
Perhaps this was the same as #207? |
I was just about to comment the same thing. @RafikBellahsene-it or @jgbos, can you check to see if the problem still occurs with |
This has been open a week now, and nobody has been able to provide a reproducible example, which means there's nothing we can do to help. Hopefully this was the same issue as #207, in which case it's now been fixed in version 4.6.3. If anybody still has a problem with the latest version of typing_extensions, and is able to provide a way for us to reproduce the problem, please open a new issue! :) |
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)
The text was updated successfully, but these errors were encountered: