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

Newer version of itsdangerous incompatible with Flask:1.1.2 #92

Closed
AnthonyGigerich opened this issue Feb 28, 2022 · 2 comments
Closed

Comments

@AnthonyGigerich
Copy link

AnthonyGigerich commented Feb 28, 2022

With the 2.1.0 version of itsdangerous on Feb 18, 2022, it is now only compatible with Flask>=1.1.4
label-studio-ml is fixing the version of Flask to 1.1.2

Error when starting the simple text classifier example:

server    | [2022-02-28 08:49:14 +0000] [1] [INFO] Starting gunicorn 20.1.0
server    | [2022-02-28 08:49:14 +0000] [1] [INFO] Listening at: http://0.0.0.0:9090 (1)
server    | [2022-02-28 08:49:14 +0000] [1] [INFO] Using worker: gthread
server    | [2022-02-28 08:49:14 +0000] [8] [INFO] Booting worker with pid: 8
server    | [2022-02-28 08:49:14 +0000] [1] [INFO] Shutting down: Master
server    | [2022-02-28 08:49:14 +0000] [1] [INFO] Reason: Worker failed to boot.
server exited with code 3

If using --preload on the gunicorn call of the Dockerfile to have better logs:

ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.8/site-packages/itsdangerous/__init__.py)

Temporary fix for me was to downgrade the version of itsdangerous to 2.0.1 in the requirements of the text classifier example backend

Best solution might be to upgrade Flask to 1.1.4 for label-studio-ml dependencies

Related issue and proposed solution on Microsoft Azure CLI:
Azure/azure-cli#21363 (comment)

@ajaymaity
Copy link

This pointed me in the right direction. I had to also fix the version of jinja2 and werkzeug. I added the following in requirements.txt file:

itsdangerous==2.0.1
jinja2==3.0.3
werkzeug==2.0.2

@makseq
Copy link
Member

makseq commented Mar 30, 2022

The fix was merged yesterday:
https://github.com/heartexlabs/label-studio-ml-backend/pull/96/files

@makseq makseq closed this as completed Mar 30, 2022
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

3 participants