Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions rptools/rpextractsink/rpextractsink.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,12 @@ def get_inchi_from_crossid(
logger.debug('Server is still too busy after multiple attempts. Aborting retrieval.')
return ''
logger.debug(f'Final page content after retries: {page.text}')
url_crossid = re_search(r'/chem_info/\w+', page.text).group()
return get_inchi_from_url(f'{url_mnx}{url_crossid}', logger)
try:
url_crossid = re_search(r'/chem_info/\w+', page.text).group()
return get_inchi_from_url(f'{url_mnx}{url_crossid}', logger)
except Exception as e:
logger.debug(f'Error retrieving InChI from URL: {e}')
return ''


def get_inchi_from_url(
Expand Down
Loading