-
Notifications
You must be signed in to change notification settings - Fork 520
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
Dumping an object with no attribute crashes #692
Comments
This happened with an unstable version of python. It is probably linked to that. |
I re-opened the issue because it happens again with python 3.11.4 and PyYAML 6.0.1
gives the error:
|
It seems that this change python/cpython#70766 causes objects to have a getstate method when none existed before. For an empty object this new getstate method returns None. This causes the serialization to crash. |
@lwinkler thanks for the investigation and link to the underlying issue- that'll save us a lot of time! |
You are most welcome. Glad to be of any help. |
This is a weird bug with the more recent version of python. Dumping an object that has no attribute raises an error.
It happens with Python 3.11.0 and pyyaml 6.0 on Windows but did not happen for older versions of Python (3.9.13) and pyyaml 6.0
This can be reproduced with:
Output:
The text was updated successfully, but these errors were encountered: