Closed beardiebeardie closed 2 years ago
The error was from the new version of Wekzeug 2.1.0 which removed some code needed for this app to run. I ended up fixing it by downgrading flask and Werkzeug from 2.1.0 to 2.0.3
pip uninstall flask and pip uninstall Werkzeug then pip install flask==2.0.3 - which installed the new version of Werkzeug 2.1.0 again. pip uninstall Werkzeug then pip install Werkzeug==2.0.3
I got this error too when I reinstalled MLSC. Your solution below fixed the problem for me, thank you!
sudo pip3 uninstall flask
~sudo pip3 uninstall Werkzeug
~ (Probably don't need this)
sudo pip3 install flask==2.0.3
sudo pip3 uninstall Werkzeug
sudo pip3 install Werkzeug==2.0.3
1.\ cd /share/music_led_strip_control/server
2.\ sudo systemctl stop mlsc
then it works fine with musicreactiv. And also in the general settings i can now pick the audio device. but after i close the terminal it wont work. but still work with non music reactive. i am a newbie and can not fix that. but some code that run this steps one after other with 10 sec. delay after boot will fix that!?!? what do you think???
thank you
That's weird, the music effects work for me after I close the terminal... Did you restart after you set the audio input device?
That's weird, the music effects work for me after I close the terminal... Did you restart after you set the audio input device?
yes, when the pi reboot the mlsc runs becaus when i go to cd /share/music_led_strip_control/server, and run sudo python3 main.py, i recive the eror that mlsc allready runs and that i can stop it with sudo systemctl stop mlsc, just like it should work. but if i paste sudo systemctl stop mlsc and then run sudo python3 main.py it works. i can pick the right soundcard and the neopix runs perfect, when i close the terminal the neopix stops but the non music effects work fine.
thank you for you answer
I think the python program will stop running when you close the terminal... Why do you need to stop and start MLSC anyway?
I think the python program will stop running when you close the terminal... Why do you need to stop and start MLSC anyway?
because i cant pick any soundcard, the sound reactiv mode does not work without select first audio device. with this steps it works.
I think the python program will stop running when you close the terminal... Why do you need to stop and start MLSC anyway?
when i close the remote desktop it still run, but that must be fixed ;-),
i also try to make a .sh on desktop and let that run auto after boot but that dont work verry well, i can see the the audio sources and pick one but the mlsc service dont work than.
but i will still try
@lelonet111 What? Of course the script will stop working if you close the terminal, That's why systemd is used.
Just run the service again instead of directly with Python:
sudo systemctl start mlsc
Closing issue since Flask_Login has been recently updated to remove the deprecated safe_str_cmp
. See changelog.
Now it is safe to update the following modules:
pip install -U Flask_Login==0.6.0 flask==2.1.1 werkzeug==2.1.1
so i fix it!
go to crontab -e
in the last row i write
@reboot sleep 10 && sudo systemctl stop mlsc && sleep 5 && sudo systemctl start mlsc
@lelonet111 That's a very bad idea and you shouldn't do it. I already said it's safe to update the modules. Why are you looking for workarounds?
Systemd is smart enough on its own to boot properly with delays after internet connection is established.
How is sleeping going to help an ImportError
anyways?
@Teraskull Teraskull I also tried the following, but it didn't solve my problem
pip install -U Flask_Login==0.6.0 flask==2.1.1 werkzeug==2.1.1
@lelonet111 Did you try running with sudo
? Pip installs modules differently for a user and root.
I did a clean install of Raspberry Pi OS version 11 Bullseye kernel 5.10.103-v7+ and decided to install your lights package version 2.
I installed using:
I am getting the following trackback error when running:
Thank you for any help.