chiefwigms / picobrew_pico

MIT License
148 stars 63 forks source link

Latest build is broken #383

Closed Intecpsp closed 6 days ago

Intecpsp commented 3 months ago

Getting the following error when trying to use the latest Docker build

2024-04-19 15:17:19 Traceback (most recent call last):
2024-04-19 15:17:19   File "/picobrew_pico/server.py", line 1, in <module>
2024-04-19 15:17:19     from app import create_app, socketio
2024-04-19 15:17:19   File "/picobrew_pico/app/__init__.py", line 1, in <module>
2024-04-19 15:17:19     from flask import Flask
2024-04-19 15:17:19   File "/usr/local/lib/python3.10/site-packages/flask/__init__.py", line 7, in <module>
2024-04-19 15:17:19     from .app import Flask as Flask
2024-04-19 15:17:19   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 27, in <module>
2024-04-19 15:17:19     from . import cli
2024-04-19 15:17:19   File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 17, in <module>
2024-04-19 15:17:19     from .helpers import get_debug_flag
2024-04-19 15:17:19   File "/usr/local/lib/python3.10/site-packages/flask/helpers.py", line 14, in <module>
2024-04-19 15:17:19     from werkzeug.urls import url_quote
2024-04-19 15:17:19 ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.10/site-packages/werkzeug/urls.py)
BuckoWA commented 3 months ago

I’m not running on docker, but after some brief searching, looks like werkzeug version is incompatible with flask. I suspect werkzeug 3.0 is being used whereas flask is 2.x (requirements.txt show flask==2.1.2) has known incompatibity with werkzeug 3.0. Could try using a werkzeug 2.x version. Just a guess here after brief search.

chiefwigms commented 3 months ago

Probably.. I'll try to update the dependencies at some point.. with three toddlers, my time for extracurricular activities is non existent

chiefwigms commented 3 months ago

Maybe someone can PR some Uber fast obfuscated binaries to help 🤣

BuckoWA commented 3 months ago

I hear you on time. I’m on the other end of the spectrum - old dog learning new tricks here. Took me two years to add two lines of code! ;-) Think we could add werkzeug==2.3.7 to requirements.txt? Or just werkzeug >=2.3, <3.0 to requirements.txt?

chiefwigms commented 3 months ago

Yeah.. I'll take a look tonight

chiefwigms commented 3 months ago

just pushed updated requirements to latest.. took me a hot minute to connect my pico but everything seemed to work, let me know if this fixes it

chiefwigms commented 3 months ago

werkzeug isn't in requirements, but on my box in both wsl2 (jammy) & w11 i had Werkzeug==3.0.2

BuckoWA commented 2 months ago

Just an FYI here… With the update in requirements.txt on bleak to 0.21.1 Python 3.7 is broken. Looks like bleak dropped support for Python 3.7 with 0.21.0. The @tmack8001 image (ps_server_stable_beta6.zip) that many use out of the box won’t start on pi boot but can be invoked from the command line. Since bleak isn’t working I suspect tilts will have an issue.

chiefwigms commented 2 months ago

Just an FYI here… With the update in requirements.txt on bleak to 0.21.1 Python 3.7 is broken. Looks like bleak dropped support for Python 3.7 with 0.21.0. The @tmack8001 image (ps_server_stable_beta6.zip) that many use out of the box won’t start on pi boot but can be invoked from the command line. Since bleak isn’t working I suspect tilts will have an issue.

forgot about 3.7 🤦‍♂️

tmack8001 commented 2 months ago

Given that python 3.7 was EOLed last year, 2023, we should drop support for it and upgrade everything over to 3.8 or even better 3.11+

chiefwigms commented 2 months ago

Given that python 3.7 was EOLed last year, 2023, we should drop support for it and upgrade everything over to 3.8 or even better 3.11+

a few commits, and its building across all versions again, but there are security vulnerabilities. we should do that though