ihmwg / python-ihm

Python package for handling IHM mmCIF and BinaryCIF files
MIT License
14 stars 7 forks source link

Unable to get model object for 39th and 40th entries #52

Closed saijananiganesan closed 4 years ago

saijananiganesan commented 4 years ago

Error while processing: self.model = ihm.model.Model self.system, = ihm.reader.read(open(self.mmcif_file), model_class=self.model)

Error statement: File "/Users/saijananiganesan/anaconda3/envs/imp/lib/python3.7/site-packages/ihm/reader.py", line 2979, in read more_data = r.read_file() File "/Users/saijananiganesan/anaconda3/envs/imp/lib/python3.7/site-packages/ihm/format.py", line 553, in read_file return self._read_file_c() File "/Users/saijananiganesan/anaconda3/envs/imp/lib/python3.7/site-packages/ihm/format.py", line 603, in _read_file_c eof, more_data = _format.ihm_read_file(self._c_format) File "/Users/saijananiganesan/anaconda3/envs/imp/lib/python3.7/site-packages/ihm/reader.py", line 1415, in call aln = self.sysr.external_files.get_by_id_or_none(alignment_file_id) File "/Users/saijananiganesan/anaconda3/envs/imp/lib/python3.7/site-packages/ihm/reader.py", line 113, in get_by_id_or_none return self.get_by_id(objid, newcls) if objid is not None else None File "/Users/saijananiganesan/anaconda3/envs/imp/lib/python3.7/site-packages/ihm/reader.py", line 97, in get_by_id if objid in self._obj_by_id: TypeError: unhashable type: '__UnknownValue'

I am guessing a new value in the cif file has not been included in the reader?

benmwebb commented 4 years ago

What version of python-ihm are you using? My guess is you're not using the latest version (0.15). This should be addressed there. (The issue is that those files use the unknown value ? for _ihm_starting_comparative_models.alignment_file_id and get_by_id_or_none didn't account for that, only the omitted value ..)

saijananiganesan commented 4 years ago

Thanks Ben. Using 0.12, updating the module.