Skip to content
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

Fix pickling error. #2100

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

Gamenot
Copy link
Collaborator

@Gamenot Gamenot commented Oct 30, 2023

Fixes #2099.

Comment on lines -52 to -55
def default_override():
return SingleAttributeOverride(True, None)

return cls(defaultdict(default_override), defaultdict(default_override))
Copy link
Collaborator Author

@Gamenot Gamenot Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core of this is that locally defined method like this becomes an out of scope reference when the standard Python pickler attempts to deserialize it so the standard pickler just does not allow the serialization in the first place.

@Gamenot Gamenot merged commit 66b30d3 into master Oct 30, 2023
26 checks passed
@Gamenot Gamenot deleted the tucker/bugfix-out_of_scope_method_reference branch October 30, 2023 15:24
@ggplz
Copy link

ggplz commented Oct 31, 2023

@Gamenot
Python 3.8.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't pickle local object 'EnvisionStateFilter.default..default_override
3 participants