Voice-Cloning-App
Voice-Cloning-App copied to clipboard
Docker images creates import error
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
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
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.