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

Werkzeug >=2.1.0 causes the web server to not function. #47

Open
Dylan1496 opened this issue May 15, 2022 · 2 comments
Open

Werkzeug >=2.1.0 causes the web server to not function. #47

Dylan1496 opened this issue May 15, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Dylan1496
Copy link

Describe the bug
When running the SwSpotify web server or using the command line interface with a python-werkzeug package version 2.1.0 or greater, the web server fails with a runtime error stating that it is not running with the werkzeug server.

To Reproduce
Steps to reproduce the behavior:

  1. Have python-werkzeug >= 2.1.0 installed
  2. Run swaglyrics

Expected behavior
The server should come up in a new tab or in a terminal and supply lyrics.

Desktop (please complete the following information):

  • OS: Arch Linux (kernel version: 5.17.7)
  • Browser: Brave
  • Version: 1.2.3 (also tested with the current AUR version, 1.2.1, to no avail)

Additional context
Werkzeug provides a warning when using a 2.0.x versioned package:
/usr/lib/python3.10/site-packages/SwSpotify/web_server.py:48: UserWarning: The 'environ['werkzeug.server.shutdown']' function is deprecated and will be removed in Werkzeug 2.1.

The documentation for werkzeug shows the proper way to do the shutdown: https://werkzeug.palletsprojects.com/en/2.1.x/serving/#shutting-down-the-server

So until a fix is provided the only way to use this is to downgrade workzeug to 2.0.3 and add it to IgnorePkg (on Arch Linux at least, I am not sure about other Linux distros).
The same message regarding deprecation appears on Windows as well, however, pip prevents the upgrade to 2.1.x.

@Dylan1496 Dylan1496 added the bug Something isn't working label May 15, 2022
@aadibajpai
Copy link
Member

@Dylan1496 I knew the deprecation warning would eventually turn into a problem but they did not have good documentation back then. Would you like to pr with the fix and I will gladly merge it and upstream everything to all pip, arch and nix repos.

@Dylan1496
Copy link
Author

I did try fixing it, however, all my attempts results in the server coming up but without anything being displayed (except for a new tab that is either a white or black screen).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants