-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
This bug is in the version of dxchange obtained through conda, I have not checked if the current version on github has the same issue.
When reading a TXRM file generated by an XRadia machine using dxchange.read_txrm, I get
UnboundLocalError: local variable 'arr' referenced before assignment
This is occurring because sometimes containers in the TXRM file can be empty. I solved the problem by modifying dxchange/reader.py to return None when the container is empty. On line 906 of reader.py;
if ole.exists(label):
stream = ole.openstream(label)
data = stream.read()
arr = struct.unpack(struct_fmt, data)
return arr
else:
return None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels