Skip to content
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

Colab not Working !!! Error when importing datapipeline #13

Closed
SauravMaheshkar opened this issue Nov 16, 2021 · 2 comments
Closed

Colab not Working !!! Error when importing datapipeline #13

SauravMaheshkar opened this issue Nov 16, 2021 · 2 comments

Comments

@SauravMaheshkar
Copy link
Contributor

Great work with reproducing the original code and creating a OpenSource PyTorch Implementation ☕️☕️☕️☕️


When I try to run the attached Colab Notebook, In the "Search against genetic databases" subsection while importing datapipeline from openfold.data, I run into a ImportError, viz.

ImportError: cannot import name 'MultipleChainsError' from 'openfold.data.templates' (/opt/conda/lib/python3.7/site-packages/openfold/data/templates.py)

The full traceback is attached below :-

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-7-8051d602620b> in <module>()
     27 from openfold.data import feature_pipeline
     28 from openfold.data import parsers
---> 29 from openfold.data import data_pipeline
     30 from openfold.data.tools import jackhmmer
     31 from openfold.model import model

/opt/conda/lib/python3.7/site-packages/openfold/data/data_pipeline.py in <module>()
     20 import numpy as np
     21 
---> 22 from openfold.data import templates, parsers, mmcif_parsing
     23 from openfold.data.tools import jackhmmer, hhblits, hhsearch
     24 from openfold.data.tools.utils import to_date

/opt/conda/lib/python3.7/site-packages/openfold/data/templates.py in <module>()
     26 import numpy as np
     27 
---> 28 from openfold.data import parsers, mmcif_parsing
     29 from openfold.data.tools import kalign
     30 from openfold.data.tools.utils import to_date

/opt/conda/lib/python3.7/site-packages/openfold/data/mmcif_parsing.py in <module>()
     27 import numpy as np
     28 
---> 29 from openfold.data.templates import MultipleChainsError
     30 import openfold.np.residue_constants as residue_constants
     31 

ImportError: cannot import name 'MultipleChainsError' from 'openfold.data.templates' (/opt/conda/lib/python3.7/site-packages/openfold/data/templates.py)

Interesting enough if I add from openfold.data.templates import MultipleChainsError I run into a circular ImportError, the error trace is attached below

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-8-71256580fa0c> in <module>()
     27 from openfold.data import feature_pipeline
     28 from openfold.data import parsers
---> 29 from openfold.data.templates import MultipleChainsError
     30 from openfold.data import data_pipeline
     31 from openfold.data.tools import jackhmmer

/opt/conda/lib/python3.7/site-packages/openfold/data/templates.py in <module>()
     26 import numpy as np
     27 
---> 28 from openfold.data import parsers, mmcif_parsing
     29 from openfold.data.tools import kalign
     30 from openfold.data.tools.utils import to_date

/opt/conda/lib/python3.7/site-packages/openfold/data/mmcif_parsing.py in <module>()
     27 import numpy as np
     28 
---> 29 from openfold.data.templates import MultipleChainsError
     30 import openfold.np.residue_constants as residue_constants
     31 

ImportError: cannot import name 'MultipleChainsError' from 'openfold.data.templates' (/opt/conda/lib/python3.7/site-packages/openfold/data/templates.py)
@gahdritz
Copy link
Collaborator

Sorry about that! One of the bugfixes yesterday introduced a circular import. Fixed in 0567d99

@tcapelle
Copy link

that was fast, I was coming to post the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants