You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the "data sources" tab is missing a column (e.g., column G on old versions of the sheet), it exceptions with an opaque error:
>>> doc = es.excel_to_sbol(wb)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python39\site-packages\sbol_utilities\excel_to_sbol.py", line 426, in excel_to_sbol
basic_parts, composite_parts, linear_products, final_products, source_table = read_metadata(wb, doc, config)
File "C:\Python39\site-packages\sbol_utilities\excel_to_sbol.py", line 110, in read_metadata
source_table = {row[config['source_name_col']].value: row[config['source_uri_col']].value
File "C:\Python39\site-packages\sbol_utilities\excel_to_sbol.py", line 112, in <dictcomp>
if row[config['source_literal_col']].value}
IndexError: tuple index out of range
It should at least be more graceful about its crash.
The text was updated successfully, but these errors were encountered:
Hello @jakebeal , enclosing the part of reading_metadata where it fetches the G column (Literal part) in a try block seems to handle this, shouldn't this be all that's needed? Also, can you describe the issue of parsing with extra columns? I am not able to reproduce it by editing the simple library xl file.
@mohitdmak I'm not surprised if it's a fairly simple fix.
For the extra columns, example, try inserting some columns in the middle with new names. I don't think it's being smart enough to handle it. If it is, though, then add a test case to validate and we're good.
When the "data sources" tab is missing a column (e.g., column G on old versions of the sheet), it exceptions with an opaque error:
It should at least be more graceful about its crash.
The text was updated successfully, but these errors were encountered: