labstructbioinf / localpdb

Python package to manage protein structures and their annotations
MIT License
40 stars 5 forks source link

Fetch ECOD history does not work #32

Closed staszekdh closed 1 year ago

staszekdh commented 1 year ago

The _get_historical_versions function fails when parsing data from http://prodata.swmed.edu/ecod/complete/distribution. This is probably due to the presence of new records such as af2_human which do not have a proper version number.

File /temp/sdunin/scr/localpdb/localpdb/plugins/ECOD.py:70, in ECOD._get_historical_versions(self)
     68         print(litag)
     69         ver_url = self.plugin_config['ecod_domain'] + litag.find('a')['href']
---> 70         version = int(str(litag.text).split(' ')[0])
     71         ecod_history[version] = ver_url # ECOD history dict
     72 return ecod_history

ValueError: invalid literal for int() with base 10: ''
jludwiczak commented 1 year ago

@staszekdh - Yes, that was originally fixed in @9c3061f but another AF2 related entry was added recently. Using the same fix for now.