When using the construct_graph function in a jupyter notebook, I encountered this error:
File ~/env/python3.10/site-packages/graphein/protein/graphs.py:764, in construct_graph(config, name, pdb_path, uniprot_id, pdb_code, df, chain_selection, model_index, df_processing_funcs, edge_construction_funcs, edge_annotation_funcs, node_annotation_funcs, graph_annotation_funcs, verbose)
761 if pdb_path is not None and isinstance(pdb_path, Path):
762 pdb_path = os.fsdecode(pdb_path)
...
--> 764 # If no config is provided, use default
765 if config is None:
766 config = ProteinGraphConfig()
NameError: name 'os' is not defined
In the graphs.py file, there is no import os. Adding this fixes the error. Not sure what's going on as I've never encountered this before?
When using the
construct_graph
function in a jupyter notebook, I encountered this error:In the
graphs.py
file, there is noimport os
. Adding this fixes the error. Not sure what's going on as I've never encountered this before?