We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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?
to your account
I am trying to save the dictionary open with mappyfile in a file, using pickle, but I get the following error:
mapy = mappyfile.open(path)
pickle.dump(mapy, open('file', 'wb'))
_pickle.PicklingError: fifth element of the tuple returned by __reduce__ must be an iterator, not odict_items.
I understand that this is the function::
if self.default_factory is None:
args = tuple()
args = self.default_factory,
return type(self), args, None, None, self.items()
Is it possible to return an iterator instead of self.items()?
The text was updated successfully, but these errors were encountered:
Add pickle test (see #68)
@guardeivid - glad you like the library.
I added a pickle test but wasn't able to recreate the issue. Would you be able to provide a minimal Mapfile snippet that causes this?
Sorry, something went wrong.
Ok the pickle test works in Python2 and not Python3, I'll add a fix for this. Thanks for reporting.
Yes, the error was in Python3. Great now it works correctly,
No branches or pull requests