PackedObjectReader
does not implement readline
- fails unpicking!
#174
Labels
bug
Something isn't working
In a use case where an output of a calculation (a
GeneralData
type of anaiida-workgraph
task) is automatically pickled and used as an input by a subsequent calculation,pickle
fails to unpickle the pickled output due to a missingreadline
method on the file handler, which is of typedisk-objectstore.utils.PackedObjectReader
.After chatting with @sphuber, it is understood that due to an optimization step by the
disk-objectstore
, the file handler changed fromio.BufferedReader
todisk_objectstore.utils.PackedObjectReader
. Unfortunately, as I'm unclear as to when this optimization takes place, I am unable to reproduce the issue at the moment, .In any case, though
disk_objectstore.utils.PackedObjectReader
implementsread
, it does not implementreadline
, both required bypickle
for unpickling. As such,pickle
fails to unpickle the output.@sphuber recommends/suggests that
disk_objectstore.utils.PackedObjectReader
is revisited to ensure it can be treated on an equal footing as anio.BufferedReader
.The text was updated successfully, but these errors were encountered: