Breaking changes with latest release of Werkzeug (2.1.0)
romanhaa opened this issue · 1 comments
romanhaa commented
Describe the bug
Werkzeug released a version 2.1.0 on 2020-03-28 and I believe it introduced breaking changes for Cirrocumulus. Following the instructions in the README (running pip install cirrocumulus; cirro launch ...
with the human lymph node example dataset) returns:
Traceback (most recent call last):
File "/Users/roman/.virtualenvs/cirrocumulus1/bin/cirro", line 8, in <module>
sys.exit(main())
File "/Users/roman/.virtualenvs/cirrocumulus1/lib/python3.9/site-packages/cirrocumulus/__main__.py", line 20, in main
cmd.main(command_args)
File "/Users/roman/.virtualenvs/cirrocumulus1/lib/python3.9/site-packages/cirrocumulus/launch.py", line 123, in main
app.run(host=args.host, port=args.port, debug=False)
File "/Users/roman/.virtualenvs/cirrocumulus1/lib/python3.9/site-packages/flask/app.py", line 920, in run
run_simple(t.cast(str, host), port, self, **options)
File "/Users/roman/.virtualenvs/cirrocumulus1/lib/python3.9/site-packages/werkzeug/serving.py", line 1047, in run_simple
fd = int(os.environ["WERKZEUG_SERVER_FD"])
File "/Users/roman/.pyenv/versions/3.9.6/lib/python3.9/os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'WERKZEUG_SERVER_FD'
This can be fixed by downgrading Werkzeug to < 2.1.0 (see below).
To Reproduce
pip install cirrocumulus
cirro launch V1_Human_Lymph_Node/V1_Human_Lymph_Node.h5ad
Expected behavior
Cirrocumulus should launch and host the application.
Desktop (please complete the following information):
- OS: macOS
Additional context
$ python --version
Python 3.9.6
$ pip list
Package Version
------------------ ---------
anndata 0.8.0
asciitree 0.3.3
Brotli 1.0.9
CacheControl 0.12.10
certifi 2021.10.8
charset-normalizer 2.0.12
cirrocumulus 1.1.26
click 8.1.0
fasteners 0.17.3
Flask 2.1.0
Flask-Compress 1.11
fsspec 2022.2.0
gunicorn 20.1.0
h5py 3.6.0
idna 3.3
importlib-metadata 4.11.3
itsdangerous 2.1.2
Jinja2 3.1.1
llvmlite 0.38.0
loompy 3.0.7
MarkupSafe 2.1.1
msgpack 1.0.3
natsort 8.1.0
numba 0.55.1
numcodecs 0.9.1
numpy 1.21.5
numpy-groupies 0.9.14
packaging 21.3
pandas 1.4.1
pip 21.3.1
pyarrow 7.0.0
pymongo 4.0.2
pyparsing 3.0.7
python-dateutil 2.8.2
pytz 2022.1
requests 2.27.1
scipy 1.8.0
setuptools 60.9.3
six 1.16.0
urllib3 1.26.9
Werkzeug 2.1.0
wheel 0.37.1
zarr 2.11.1
zipp 3.7.0
Solution
Downgrade Werkzeug to < 2.1.0:
pip install "werkzeug<2.1.0"
$ pip list
Package Version
------------------ ---------
anndata 0.8.0
asciitree 0.3.3
Brotli 1.0.9
CacheControl 0.12.10
certifi 2021.10.8
charset-normalizer 2.0.12
cirrocumulus 1.1.26
click 8.1.0
fasteners 0.17.3
Flask 2.1.0
Flask-Compress 1.11
fsspec 2022.2.0
gunicorn 20.1.0
h5py 3.6.0
idna 3.3
importlib-metadata 4.11.3
itsdangerous 2.1.2
Jinja2 3.1.1
llvmlite 0.38.0
loompy 3.0.7
MarkupSafe 2.1.1
msgpack 1.0.3
natsort 8.1.0
numba 0.55.1
numcodecs 0.9.1
numpy 1.21.5
numpy-groupies 0.9.14
packaging 21.3
pandas 1.4.1
pip 22.0.4
pyarrow 7.0.0
pymongo 4.0.2
pyparsing 3.0.7
python-dateutil 2.8.2
pytz 2022.1
requests 2.27.1
scipy 1.8.0
setuptools 60.9.3
six 1.16.0
urllib3 1.26.9
Werkzeug 2.0.3
wheel 0.37.1
zarr 2.11.1
zipp 3.7.0
Now it works as expected.
joshua-gould commented
Thanks so much for the report. It's fixed in version 1.1.27.