|
Post by drstang on Jan 30, 2023 10:55:52 GMT -8
Hi - I am using the SDL image on my pi, and just started to have issues with my Dash app after a new flash.
I am trying to run "/SDL_Pi_SkyWeather2/dash_app $ sudo python3 index.py"
and am getting the following error:
Traceback (most recent call last):
File "index.py", line 20, in <module>
import status_page
File "/home/pi/SDL_Pi_SkyWeather2/dash_app/status_page.py", line 23, in <module>
import state
File "/usr/local/lib/python3.7/dist-packages/state/__init__.py", line 39
except AttributeError, e:
^
SyntaxError: invalid syntax
I've seen about Dash component issues on the forum, so I have installed "sudo pip3 install dash==1.21.0 dash-bootstrap-components==0.13.0 dash-core-components==1.17.1 dash-daq==0.5.0 dash-html-components==1.1.4 dash-table==4.12.0" (after uninstalling the newer Dash)
Any help would be appreciated.
Thanks!
|
|
|
Post by drstang on Jan 30, 2023 13:26:20 GMT -8
running python3 index.py out of my WeatherSense/dash_app folder gives me this error:
<module 'config' from '/usr/local/lib/python3.7/dist-packages/config/__init__.py'> Traceback (most recent call last): File "index.py", line 36, in <module> import indoorth File "/home/pi/SDL_Pi_WeatherSense/dash_app/indoorth.py", line 25, in <module> print(config.English_Metric) AttributeError: module 'config' has no attribute 'English_Metric'
|
|
Sopwith
Junior Member

"If it works out of the box - what fun is that?"
Posts: 69
Raspberry Pi: Yes
Other Device: Pico Pi
|
Post by Sopwith on Jan 30, 2023 13:45:58 GMT -8
drstang, How old is that image? I traced back the error trace to the code posted on Github, and the code is not the same. github.com/switchdoclabs/SDL_Pi_SkyWeather2Perhaps you need to upgrade to the latest version. cd cd SDL_Pi_SkyWeather2 git pull sudo pip3 install vcgencmd sudo mysql -u root -p < WeatherSenseWireless.sql sudo mysql -u root -p WeatherSenseWireless < updateWeatherSenseWireless.sql Once the above update completes, perform the following: cd rtl_433/ mkdir build cd build cmake .. make clean make sudo make install The above update instructions are on the Github page referenced above. Sopwith
|
|
|
Post by drstang on Jan 30, 2023 14:07:49 GMT -8
Thanks for the reply - the actually pi image is from May '22, but I did run 'git pull' earlier today.
When I try running the mysql code, I'm now getting :
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
|
|
|
Post by drstang on Jan 30, 2023 14:16:16 GMT -8
and I should also note, despite the mysql code not working (now) - the SkyWeather script was working... my dashapp is the one giving me issues..
EDIT: Can confirm the SkyWeather script is running appropriately. Mysql error was caused by the script already running. I killed the existing script and successfully re-ran the SkyWeather script. No such luck with dashapp yet...
|
|
|
Post by SDL on Jan 31, 2023 18:08:50 GMT -8
Post the error that the current dash app is throwing. Including the python errors.
BP
|
|
|
Post by drstang on Feb 1, 2023 17:52:36 GMT -8
Thanks for the response. Running the dashapp script (index.py) out of WeatherSense folder I'm getting this error:
<module 'config' from '/usr/local/lib/python3.7/dist-packages/config/__init__.py'> Traceback (most recent call last): File "index.py", line 36, in <module> import indoorth File "/home/pi/SDL_Pi_WeatherSense/dash_app/indoorth.py", line 25, in <module> print(config.English_Metric) AttributeError: module 'config' has no attribute 'English_Metric'
I've run git pull and also reinstalled the config module. Still no luck...
|
|
|
Post by SDL on Feb 2, 2023 17:11:25 GMT -8
OK. I don't have a good explanation. When we run it, we get: pi@SwitchDocLabs:~/SDL_Pi_WeatherSense/dash_app $ sudo python3 index.py <module 'config' from '../config.py'> 0 /home/pi/SDL_Pi_WeatherSense/dash_app/static dash_app running on port 8051 * Serving Flask app "index" (lazy loading) * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: off We uploaded a new version, V018 a few minutes ago but it shouldn't do anything for your problem. I would suggest deleting the entire WeatherSense directory and reinstall from github github.com/switchdoclabs/SDL_Pi_WeatherSenseBP
|
|
Sopwith
Junior Member

"If it works out of the box - what fun is that?"
Posts: 69
Raspberry Pi: Yes
Other Device: Pico Pi
|
Post by Sopwith on Feb 3, 2023 14:13:07 GMT -8
drstang,
So - these posts have me totally confused. Help me out here please, so I can understand what is going on.
In your first post, you referred to a SkyWeather2 installation: "I am trying to run "/SDL_Pi_SkyWeather2/dash_app $ sudo python3 index.py"
In your second post your referred to a WeatherSense installation: "File "/home/pi/SDL_Pi_WeatherSense/dash_app/indoorth.py", line 25, in <module>"
These are two different projects that have different source code trees.
Maybe I am missing something here? Do you have the old WeatherSense hardware or the SkyWeather2 hardware?
Sopwith
|
|