Replies: 2 comments 5 replies
-
The DeserializationError print-out shows what has been deserialized up to the point where it encountered an error, which usually provides some clues. In this case, it thought that the MParContainer's version is 0, which is odd because most version numbers start with 1. (I don't know if that is a necessary rule.) The fact that both of the TObject members, fProcessID and fBits, are both None, is also very unusual. I would guess that the actual error happened before getting to MParContainer. Is 14798723 a reasonable number of bytes for MHMcCollectionArea? That would be 14 MiB, something that carries a real dataset, maybe some arrays or lots of small objects. The next steps for digging more deeply is to print out the streamers for these objects. If you've opened a file as f.file.show_streamers() or to narrow in on MParContainer and its dependencies, f.file.show_streamers("MParContainer") Each of these is a prescription for how-many-bytes-per-field in each object, and base classes ("BASE") are serialized as nested objects. For TTree data (which this is not), there's a key = f.key("path/to/object") will give you a uproot.reading.ReadOnlyKey, and chunk, cursor = key.get_uncompressed_chunk_cursor() does all the reading and decompression but not any of the interpretation, which fails for your object. Then cursor.debug(chunk, limit_bytes=80) prints out raw bytes of the object, up to >>> np.array([uproot.const.kByteCountMask], ">i4").view("u1")
array([64, 0, 0, 0], dtype=uint8) ... Or you can post a small file and I'll look into it when I can find the time. But the above procedure is what I would do: (1) print out the streamers, (2) print out the raw bytes, and (3) follow the raw bytes through the streamers to see what assumption is wrong. The code generated from the streamers is a class returned by f.file.class_of("MHMcCollectionArea") # also in uproot.dynamic after the first time you attempt to read it which has a |
Beta Was this translation helpful? Give feedback.
-
So when it tries to evaluate That's definitely sounding like some Uproot bug. Could you get the 11 MB file to me somehow (here, publicly, or to jpivarski at GMail, privately) and I'll at least figure out why it thinks the dependency has the wrong |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Trying to read a ROOT file with custom objects inside, I get this error:
Do I interpret this correctly that something is wrong with the streamer info for the
MParContainer
base class?Any hints on what I can try to fix would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions