-
-
Notifications
You must be signed in to change notification settings - Fork 310
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("Subscripted generics cannot be used with class and instance checks") #1500
Comments
## Summary & Motivation Some dependency of pandera is causing breakage of one of our docs_snippets tests. The same issue is afflicting other users of pandera: unionai-oss/pandera#1500 Since it is not clear what nth-order dependency of pandera needs to be pinned, just skip this test and wait for the upstream pandera fix.
We are also getting this issue, please see below:
|
I encountered a similar problem, which appeared to stem from the multimethod package. Resolving the issue was achieved by downgrading the package to version 1.11. |
I also encountered the same issue. I am using python 3.9.5 in databricks runtime 12.2 (pandera 0.18.0) |
@PierreC1024 , I have multimethod version 1.11.1 . Did you downgrade it to 1.11.0? |
Yes, I downgrade to 1.11 (version 1.11.0 does not exist, it is the 1.11).
…On Tue, Feb 20, 2024, 19:58 ushakrishna2k ***@***.***> wrote:
@PierreC1024 <https://github.com/PierreC1024> , I have multimethod
version 1.11.1 . Did you downgrade it to 1.11.0?
—
Reply to this email directly, view it on GitHub
<#1500 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE34XVXSDOPXCNXGEHN2HSDYUTW5HAVCNFSM6AAAAABDRGD6L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUHA3TCMRYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I can confirm rolling back to multimethod==1.11 before the feb 19th update has stopped the "TypeError("Subscripted generics cannot be used with class and instance checks")" schema error. I am so pleased because I love the pandera library. |
Thanks, everyone, this solved my issue on AWS Glue, just versioned |
I was able to fix the issue in databricks by rolling back the multimodel library to 1.11 |
## Summary & Motivation Some dependency of pandera is causing breakage of one of our docs_snippets tests. The same issue is afflicting other users of pandera: unionai-oss/pandera#1500 Since it is not clear what nth-order dependency of pandera needs to be pinned, just skip this test and wait for the upstream pandera fix.
Question about pandera
I am running the code below on two environments:
ENV1 = databricks spark cluster driver node (same pandera, pandas versions)
ENV2 = local standard VENV(same pandera, pandas versions)
Both environments have the same pandas and pandera versions.
The dataframe validates on local (ie ENV2) with no schema errors but I get "TypeError("Subscripted generics cannot be used with class and instance checks")" on the databricks spark cluster driver node (ie ENV2).
Why am I getting this failure and what does it mean? It is specific to the pa.Check.isin.
The text was updated successfully, but these errors were encountered: