You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should re-import the singleton with its saved state, but instead raises an error ending in:
...
File~/work/pyiron/h5io/h5io/_h5io.py:378, in_triage_write(key, value, root, comp_kw, where, cleanup_data, slash, title, use_json, use_state)
366reconstructor, _, state, *additional=reduced367# For plain objects defining a simple __getstate__ python uses a368# default reconstruction function defined in the copyreg module, if369# an object wants to be reconstructed in any other way, we don't
(...)
374# reconstruction of the object (documented in the pickle module)375# that we don't implement currently in the _triage_read function376is_custom= (
377reconstructorisnottype(value)
-->378andreconstructor.__module__!="copyreg"379 )
380ifis_customorlen(additional) !=0:
381raiseTypeError(
382f"Can't write {repr(value)} at location {key}:\n"383f"Class {class_type} defines custom reconstructor."384 )
AttributeError: 'str'objecthasnoattribute'__module__'
The text was updated successfully, but these errors were encountered:
E.g. for the singleton pattern, as discussed in the pickle docs for
__reduce__
MWE:
This should re-import the singleton with its saved state, but instead raises an error ending in:
The text was updated successfully, but these errors were encountered: