toniebox-audio-match
toniebox-audio-match copied to clipboard
cannot import name 'soft_unicode' from 'markupsafe'
I get the following error when running docker compose up. Using raspbian
toniebox-audio-match-backend-1 | Successfully built tinytag MarkupSafe toniebox-audio-match-backend-1 | Installing collected packages: Werkzeug, urllib3, tinytag, Six, MarkupSafe, itsdangerous, idna, click, chardet, certifi, requests, Jinja2, Flask, Flask-Cors toniebox-audio-match-backend-1 | Successfully installed Flask-1.1.4 Flask-Cors-3.0.10 Jinja2-2.11.3 MarkupSafe-2.1.1 Six-1.16.0 Werkzeug-1.0.1 certifi-2022.6.15 chardet-4.0.0 click-7.1.2 idna-2.10 itsdangerous-1.1.0 requests-2.25.1 tinytag-1.5.0 urllib3-1.26.9 toniebox-audio-match-backend-1 | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv toniebox-audio-match-backend-1 | WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available. toniebox-audio-match-backend-1 | You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. toniebox-audio-match-backend-1 | Traceback (most recent call last): toniebox-audio-match-backend-1 | File "app.py", line 7, in
toniebox-audio-match-backend-1 | from flask import Flask, jsonify, request toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/flask/init.py", line 14, in toniebox-audio-match-backend-1 | from jinja2 import escape toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/jinja2/init.py", line 12, in toniebox-audio-match-backend-1 | from .environment import Environment toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 25, in toniebox-audio-match-backend-1 | from .defaults import BLOCK_END_STRING toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in toniebox-audio-match-backend-1 | from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401 toniebox-audio-match-backend-1 | File "/usr/local/lib/python3.8/site-packages/jinja2/filters.py", line 13, in toniebox-audio-match-backend-1 | from markupsafe import soft_unicode toniebox-audio-match-backend-1 | ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.8/site-packages/markupsafe/init.py) toniebox-audio-match-backend-1 exited with code 1
I have the same issue
You can add the line MarkupSafe == 2.0.1
to the file server/requirements.txt
.
Afterwards the backend should start normally when running docker-compose up
. However I haven't tested any functionality beyond opening the frontend.
(I didn't come up with this solution myself, it's based on https://github.com/croesnick/toniebox-audio-match/pull/24)
You can add the line
MarkupSafe == 2.0.1
to the fileserver/requirements.txt
. Afterwards the backend should start normally when runningdocker-compose up
. However I haven't tested any functionality beyond opening the frontend.(I didn't come up with this solution myself, it's based on #24)
Came here cause I had the same issue, this fixed it right away. Thank you! :)