When trying to deploy unfurl following the instruction in the readme file the application crashes with the following error:
# python unfurl_cli.py
Traceback (most recent call last):
File "/home/user/unfurl/unfurl_cli.py", line 20, in <module>
from unfurl import core
File "/home/user/unfurl/unfurl/core.py", line 26, in <module>
from flask_restx import Api, Namespace, Resource
File "/home/user/venv-unfurl/lib/python3.10/site-packages/flask_restx/__init__.py", line 5, in <module>
from .api import Api # noqa
File "/home/user/venv-unfurl/lib/python3.10/site-packages/flask_restx/api.py", line 50, in <module>
from .swagger import Swagger
File "/home/user/venv-unfurl/lib/python3.10/site-packages/flask_restx/swagger.py", line 18, in <module>
from werkzeug.routing import parse_rule
ImportError: cannot import name 'parse_rule' from 'werkzeug.routing' (/home/user/venv-unfurl/lib/python3.10/site-packages/werkzeug/routing/__init__.py)
Possible reason: It looks like the Flask package was recently updated to version 2.2.0 which seems to change how the Werkzeug package is used. And that breaks unfurl :(
How to reproduce
Clone unfurl
Install the current requirements via pip -r requirements.txt in a fresh venv
Try to run python unfurl_cli.py
Possible solution
According to my tests this can be fixed short-term by pinning the flask and Werkzeug package version in the requirements.txt file.
Problem
When trying to deploy unfurl following the instruction in the readme file the application crashes with the following error:
Possible reason: It looks like the Flask package was recently updated to version 2.2.0 which seems to change how the Werkzeug package is used. And that breaks unfurl :(
How to reproduce
pip -r requirements.txt
in a fresh venvpython unfurl_cli.py
Possible solution
According to my tests this can be fixed short-term by pinning the
flask
andWerkzeug
package version in the requirements.txt file.I'll send a PR to fix this.