-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
Pandera's check doesn't work after bundling #3035
Comments
Bug reports with |
Makes sense. I ran again the same, but without the DEBUG:root:Validated DF WITHOUT any check
ERROR:root:Schema validation error: Error while executing check function: DispatchError("No matching functions found")
Traceback (most recent call last):
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\backends\pandas\components.py", line 217, in run_checks
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\backends\pandas\base.py", line 102, in run_check
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\api\checks.py", line 227, in __call__
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\backends\pandas\checks.py", line 296, in __call__
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\multimethod\__init__.py", line 432, in __call__
multimethod.DispatchError: No matching functions found
Traceback (most recent call last):
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\test.py", line 71, in <module>
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\test.py", line 68, in main
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\test.py", line 61, in run_checks
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\api\pandas\container.py", line 375, in validate
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\api\pandas\container.py", line 404, in _validate
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\backends\pandas\container.py", line 100, in validate
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\backends\pandas\container.py", line 175, in run_checks_and_handle_errors
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\api\base\error_handler.py", line 54, in collect_error
pandera.errors.SchemaError: Error while executing check function: DispatchError("No matching functions found")
Traceback (most recent call last):
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\backends\pandas\components.py", line 217, in run_checks
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\backends\pandas\base.py", line 102, in run_check
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\api\checks.py", line 227, in __call__
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\pandera\backends\pandas\checks.py", line 296, in __call__
File "C:\Users\mgme2\AppData\Local\Temp\ONEFIL~1\multimethod\__init__.py", line 432, in __call__
multimethod.DispatchError: No matching functions found |
I added it to the issue template. There was no way it was related to your error, this is more of a principle that you had so far no way of knowing to adhere, except that it asks for minimizing option usage. I looked at anti-bloat and removed dask usage for pandera, and now eliminate the need for the deprecated pedantic workaround, and then I will be able to see what this is about. In the end something like |
This decorator seems to want to do something funny. It seems to be getting the function name and tries to find the previous name, which makes sense. However, the frame locals for Nuitka are not updated for functions, and then it could easily be default to It seems it will either need help or be recognize as one, where the frame locals could be updated before its call. Nuitka does it only when an exception occurs. Making the larger change and having readable frame variables all the time, because that's where they are stored, is not going to happen quickly, but this should be a nice possibility to just make |
How did you install Nuitka and Python
Python installed through pyenv-win
Nuitka installed via
poetry add nuitka
The specific PyPI names and versions
Result:
Troubleshooting:
After bundling and when using's Pandera's check field an exception is raised. Without a check, all works fine.
Nuitka options used:
python -m nuitka --deployment --standalone --onefile --follow-imports --mingw64 --assume-yes-for-downloads --include-module=pydantic.deprecated.decorator test.py
The text was updated successfully, but these errors were encountered: