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

bukuserver bails with error from werkzeug.urls #707

Closed
r0max opened this issue Jan 7, 2024 · 2 comments
Closed

bukuserver bails with error from werkzeug.urls #707

r0max opened this issue Jan 7, 2024 · 2 comments

Comments

@r0max
Copy link

r0max commented Jan 7, 2024

After following the installation instructions for bukuserver with pip3 from PyPi (https://github.com/jarun/buku/blob/master/bukuserver/README.md#installation), bukuserver fails to start with the following error:

(env) ~$ bukuserver run help
Traceback (most recent call last):
File "/home/r0max/env/bin/bukuserver", line 5, in
from bukuserver.server import cli
File "/home/r0max/env/lib/python3.9/site-packages/bukuserver/server.py", line 11, in
from flask_api import FlaskAPI, status
File "/home/r0max/env/lib/python3.9/site-packages/flask_api/init.py", line 1, in
from flask_api.app import FlaskAPI
File "/home/r0max/env/lib/python3.9/site-packages/flask_api/app.py", line 10, in
from flask_api.request import APIRequest
File "/home/r0max/env/lib/python3.9/site-packages/flask_api/request.py", line 5, in
from werkzeug.urls import url_decode_stream
ImportError: cannot import name 'url_decode_stream' from 'werkzeug.urls' (/home/r0max/env/lib/python3.9/site-packages/werkzeug/urls.py)

What am I missing?

@LeXofLeviafan
Copy link
Collaborator

…Not sure how you managed to install it since the recent pip versions refuse to install both the latest PyPI version (4.7.1) and the latest release (4.8) which wasn't even published at PyPI for the same reason 😅
(See discussion in #685)

As for the error you're getting, the function werkzeug.urls.url_decode_stream() was deprecated and set for removal in werkzeug-2.4; there is currently a workaround implemented, but it wasn't present at the time of 4.8 release.

In other words, you can either downgrade werkzeug package manually, or install the nightly build instead:

pip install "buku[server] @ git+https://github.com/jarun/buku"

@r0max
Copy link
Author

r0max commented Jan 8, 2024

Thank you! The nightly build worked on first attempt. I have tried quite a number of other routes before, including downgrading werkzeug, but hit other walls.

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

2 participants