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

Error in create_knowedge_graph.py #10

Open
emyyue opened this issue Jun 18, 2024 · 2 comments
Open

Error in create_knowedge_graph.py #10

emyyue opened this issue Jun 18, 2024 · 2 comments

Comments

@emyyue
Copy link

emyyue commented Jun 18, 2024

Hi!
Installation runs with conda. Poetry install only manages to install bioregistry when python version was set to python = "~3.11"

Now I am trying to create the KG with python create_knowledge_graph.py
This is the error I stumble in. Any idea how to fix it?

INFO -- This is BioCypher v0.5.43.
INFO -- Logging into `biocypher-log/biocypher-20240618-174557.log`.
Traceback (most recent call last):
  File "/Users/huy169/Documents/github/biocypher_verse/metalinks/create_knowledge_graph.py", line 17, in <module>
    from metalinks.adapters.stitch_adapter import (
  File "/Users/huy169/Documents/github/biocypher_verse/metalinks/metalinks/adapters/stitch_adapter.py", line 10, in <module>
    from pypath.utils import mapping
  File "/Users/huy169/Library/Caches/pypoetry/virtualenvs/metalinks-y7QBJz4L-py3.11/lib/python3.11/site-packages/pypath/utils/mapping.py", line 64, in <module>
    import pypath.internals.maps as maps
  File "/Users/huy169/Library/Caches/pypoetry/virtualenvs/metalinks-y7QBJz4L-py3.11/lib/python3.11/site-packages/pypath/internals/maps.py", line 23, in <module>
    import pypath.internals.input_formats as input_formats
  File "/Users/huy169/Library/Caches/pypoetry/virtualenvs/metalinks-y7QBJz4L-py3.11/lib/python3.11/site-packages/pypath/internals/input_formats.py", line 651, in <module>
    class UnichemMapping(MappingInput):
  File "/Users/huy169/Library/Caches/pypoetry/virtualenvs/metalinks-y7QBJz4L-py3.11/lib/python3.11/site-packages/pypath/internals/input_formats.py", line 655, in UnichemMapping
    for id_type in unichem_input.unichem_sources().values()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/huy169/Library/Caches/pypoetry/virtualenvs/metalinks-y7QBJz4L-py3.11/lib/python3.11/site-packages/pypath/inputs/unichem.py", line 98, in unichem_sources
    for s in unichem_info()
             ^^^^^^^^^^^^^^
  File "/Users/huy169/Library/Caches/pypoetry/virtualenvs/metalinks-y7QBJz4L-py3.11/lib/python3.11/site-packages/pypath/inputs/unichem.py", line 59, in unichem_info
    soup = bs4.BeautifulSoup(c.result, 'html.parser')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/huy169/Library/Caches/pypoetry/virtualenvs/metalinks-y7QBJz4L-py3.11/lib/python3.11/site-packages/bs4/__init__.py", line 315, in __init__
    elif len(markup) <= 256 and (
         ^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Best

@dbdimitrov
Copy link

Hi @emyyue,

Apologize for the delayed response.

I believe this issue is related to pypath. Installing pypath from this fork: https://github.com/dbdimitrov/pypath/tree/metalinks should resolve the issue.

Please let us know if we can provide anything else.

Daniel

@dbdimitrov
Copy link

PS. a neo4j dump if you share an email can be downloaded from here: https://zenodo.org/records/11066196, and any auxiliary files are downloadable from here: https://github.com/saezlab/MetalinksDB/tree/main/metalinksDB

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

2 participants