Skip to content

Fetch ECOD history does not work #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
staszekdh opened this issue Jun 1, 2023 · 2 comments
Open

Fetch ECOD history does not work #32

staszekdh opened this issue Jun 1, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@staszekdh
Copy link
Member

staszekdh commented Jun 1, 2023

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 jludwiczak self-assigned this Jun 4, 2023
@jludwiczak jludwiczak added the bug Something isn't working label Jun 4, 2023
@jludwiczak
Copy link
Member

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

@staszekdh
Copy link
Member Author

@jludwiczak the problem with ECOD s back. Quick fix is to edit /plugins/ECOD.py:

  • for litag in ultag.find_all('li')[:-2] to for litag in ultag.find_all('li')[:-3]

  • cols = [x if x != 'f_id' else 'ecod_number' for x in tmp_df.columns] to cols = [x if x != 't_id' else 'ecod_number' for x in tmp_df.columns]

@staszekdh staszekdh reopened this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants