-
-
Notifications
You must be signed in to change notification settings - Fork 508
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 1.0.0 breaks flask libraries #742
Comments
I see 3 issues. 1: #### Creating InfluxDB database and user This means the database and user for influxdb was not created. 2: #### Connecting to http://localhost (creates Mycodo database if it doesn't exist) This means the web server couldn't be connected to. I suspect the web server never started, from the next error. 3: #### Restarting the Mycodo daemon This error is unexpected. The Pi zero is very slow, which is why 1 and 2 have wait periods and repetitions, specifically for the Pi zero. However, it seems for some reason it wasn't long enough to allow influxdb to start (1), as Influxdb needs to be started before a database and user can be created. 2 is trying to connect to the web server (which the first connect creates the sqlite settings database). I suspect the error in 3 preventing the daemon from starting is also preventing the web server from starting because the same lazy_gettext is used that caused the daemon to crash. Hence, the webserver connect timed out all 5 times. Error 3 is likely what's causing all the problems, and I suspect it's the result of filesystem corruption, which can be caused by a bad Raspbian write to your SD card or a bad SD card. I would recommend redownloading the Raspbian image and writing it to a different SD card and trying the install again and see if the exact same issues (1, 2, and 3) appear. I am building a project that I'll need to install Mycodo fresh to a Pi3, so I'll be able able to test shortly. But in the meantime, I would recommend testing the above potential fix. |
Hey Kyle, thanks for the quick response! |
It has worked on the zero. I've spent quite a bit of time fixing issues in the past so it would. There are also several active installs on zeros. Perhaps this is an issue with a piece of 3rd party software. I'll try to replicate the issue this weekend if I have time and if I can, I'll try to diagnose the issue/push a fix. |
Hi! Just got the same errors on a RPi4 with a fresh raspbian buster lite (2020-02-05) install. There seem to be two problems:
Still got errors importing the libs - so I changed: ./Mycodo/env/lib/python3.7/site-packages/flask_babel/init.py ./Mycodo/env/lib/python3.7/site-packages/flask_wtf/recaptcha/widgets.py ./Mycodo/env/lib/python3.7/site-packages/flask_restplus/fields.py" After running sudo ./Mycodo/install/setup.sh again I managed to finish the basic setup successfully. |
It looks like Flask-Babel just released (2 days ago) 1.0.0 that fixes the werkzeug issue. All you need to (theoretically) do is install the latest Flask-Babel. I'll test soon. |
…nstall wait times to prevent timeouts (#742), update pip requirements
I just pushed potential fixes, so if you would like to test, you can install from master with the following commands. First, make sure there isn't a ~/Mycodo directory so you're installing fresh. sudo apt install git
cd ~
git clone https://github.com/kizniche/Mycodo
cd Mycodo/install
sudo ./setup.sh |
For reference, this seems to be the issue: python-babel/flask-babel#157 |
I see TravisCI showing now three's an issue with flask_wtf. Stand by while I investigate. |
That fixed flask-wtf, now flask_restplus is having issues... |
Seems Flask-RestPlus is dead, replaced by Flask-RESTX. Until I can merge from RestPlus to RESTX, I'm testing the fix by downgrading Werkzeug to 0.16.1. |
Merging to Flask-RESTX was easier than I thought, so that's now done. They're currently working on a solution for using Werkzeug 1.0.0, which should be a part of their next release. Until then, Mycodo will use Werkzeug 0.16.1. It should now be safe to install from master to test. |
I didn't mention, but I also increased the wait period for both influxdb database/user creation and daemon restart to 10 tries with 60 second pauses between. That should be more than enough. |
Everything seems to be working on the raspi zero now, |
Great! Thanks for testing on the zero. |
I'm going to keep this open until Flask-RESTX updates to be compatible with Werkzeug 1.0.0. |
flask-restx just released 0.2.0. I'll test and include the version change in the next release if I don't find any issues. |
Attempted to install Mycodo on a clean install of raspbian buster lite (February 2020 version). Message says mycodo installed successfully but I get an error 502 when trying to access the web interface.
here's my setup log
setup.log
The text was updated successfully, but these errors were encountered: