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

Import errors when using the docker container #20

Open
heringerp opened this issue Mar 2, 2024 · 0 comments
Open

Import errors when using the docker container #20

heringerp opened this issue Mar 2, 2024 · 0 comments
Assignees

Comments

@heringerp
Copy link

I built the docker container and tried using it interactively but for the scripts odgi_to_rdf.py and sparql_odgi.py I get the following import error:

root@9580c13cbb68:/spodgi# odgi_to_rdf.py
Traceback (most recent call last):
  File "/usr/bin/odgi_to_rdf.py", line 3, in <module>
    import rdflib
  File "/usr/local/lib/python3.7/dist-packages/rdflib-7.0.0-py3.7.egg/rdflib/__init__.py", line 47, in <module>
    from importlib import metadata
ImportError: cannot import name 'metadata' from 'importlib' (/usr/lib/python3.7/importlib/__init__.py)

For the sparql_server.py script I got a different ImportError:

root@9580c13cbb68:/spodgi# ./sparql_server.py
Traceback (most recent call last):
  File "./sparql_server.py", line 2, in <module>
    from flask import Flask, request, jsonify, Response, g
  File "/usr/local/lib/python3.7/dist-packages/flask-3.0.2-py3.7.egg/flask/__init__.py", line 5, in <module>
    from . import json as json
  File "/usr/local/lib/python3.7/dist-packages/flask-3.0.2-py3.7.egg/flask/json/__init__.py", line 6, in <module>
    from ..globals import current_app
  File "/usr/local/lib/python3.7/dist-packages/flask-3.0.2-py3.7.egg/flask/globals.py", line 6, in <module>
    from werkzeug.local import LocalProxy
  File "/usr/local/lib/python3.7/dist-packages/werkzeug-3.0.1-py3.7.egg/werkzeug/__init__.py", line 5, in <module>
    from .serving import run_simple as run_simple
  File "/usr/local/lib/python3.7/dist-packages/werkzeug-3.0.1-py3.7.egg/werkzeug/serving.py", line 76, in <module>
    t.Union["ssl.SSLContext", t.Tuple[str, t.Optional[str]], t.Literal["adhoc"]]
AttributeError: module 'typing' has no attribute 'Literal'

Both of these issues seem to come from the fact that the docker container has Python 3.7 installed, but rdflib 7.0.0 and flask 3.0.2 require Python 3.8.

@JervenBolleman JervenBolleman self-assigned this Mar 11, 2024
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