Voice-Cloning-App icon indicating copy to clipboard operation
Voice-Cloning-App copied to clipboard

Docker images creates import error

Open 5trubel opened this issue 2 years ago • 2 comments

When starting the built Docker container (docker build -t voice-cloning:latest .), it immediately exits with the following error in the log:

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    from flask_socketio import SocketIO
  File "/opt/conda/lib/python3.7/site-packages/flask_socketio/__init__.py", line 18, in <module>
    import flask
  File "/opt/conda/lib/python3.7/site-packages/flask/__init__.py", line 19, in <module>
    from . import json
  File "/opt/conda/lib/python3.7/site-packages/flask/json/__init__.py", line 15, in <module>
    from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/opt/conda/lib/python3.7/site-packages/itsdangerous/__init__.py)

Tried the latest version (1.1.1) as well as the latest master branch

5trubel avatar Apr 28 '22 00:04 5trubel

Seems to work if you lock these libs to their 3.6 latest version:

itsdangerous==2.0.1
werkzeug==2.0.3
joblib==1.1.0

nicsor avatar Oct 04 '22 06:10 nicsor

I was using having the same ImportError: cannot import name 'json' from 'itsdangerous' (/opt/conda/lib/python3.7/site-packages/itsdangerous/__init__.py) error (but not using docker). I had to git clone the main branch, rather than downloading the archived source code from the releases section.

kqvanity avatar Aug 06 '23 07:08 kqvanity