-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
dill.load_session()
raises NameError: name 'UnpicklingError' is not defined
#648
Labels
Milestone
Comments
Hm, ok. Can you provide a minimal session that produces this error? Doing so would help us reproduce, confirm, and fix the issue. |
I've updated my description above. Sorry for any confusion. The file I was loading is NOT a valid dump file. |
lizy14
added a commit
to lizy14/dill
that referenced
this issue
Feb 22, 2024
8 tasks
Minimum repro: import tempfile
import dill
with tempfile.TemporaryFile() as f:
f.write("some content that is not a valid dump".encode())
f.flush()
try:
dill.load_session(f.name)
except Exception as e:
print(type(e), str(e)) This will print: |
thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dill.load_session()
raisesNameError: name 'UnpicklingError' is not defined
The file from which I'm loading is indeed invalid, the exception
ValueError: at position 5, opcode b' ' unknown
makes sense. But why this exception is not raised properly and I gotNameError: name 'UnpicklingError' is not defined
instead?The text was updated successfully, but these errors were encountered: