|
Post by bccomputer1 on Mar 15, 2018 13:43:40 GMT -8
Hello - I've been getting this error every time my Grove Weather Pi Station tries to send data to the Weather Underground. I have checked everything I think I can possibly check. I have re installed from scratch. With Raspian V. 1.92 because of horrible mariadb / mysql issue. The station ran for about a year. Then suddenly started getting this error > NameError: global name 'bmp180Temperature' is not defined. Has anyone else had this issue. Or know what I can try to fix it?
|
|
|
Post by SDL on Mar 15, 2018 15:04:41 GMT -8
Could you grab the output at the fail (on both sides) and post it here?
BP
|
|
|
Post by bccomputer1 on Mar 16, 2018 7:30:48 GMT -8
Not sure what you meant by both sides. But this is what it looks like when it stops. I haven't made any changes to the pyhthon script. But it says bmp180Temperature is not defined.
trying database before query Traceback (most recent call last): File "GroveWeatherPi.py", line 1681, in <module> writeWeatherRecord() File "GroveWeatherPi.py", line 1392, in writeWeatherRecord query = 'INSERT INTO WeatherData(TimeStamp,as3935LightningCount, as3935LastInterrupt, as3935LastDistance, as3935LastStatus, currentWindSpeed, currentWindGust, totalRain, bmp180Temperature, bmp180Pressure, bmp180Altitude, bmp180SeaLevel, outsideTemperature, outsideHumidity, currentWindDirection, currentWindDirectionVoltage, insideTemperature, insideHumidity) VALUES(UTC_TIMESTAMP(), %.3f, %.3f, %.3f, "%s", %.3f, %.3f, %.3f, %i, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f)' % (as3935LightningCount, as3935LastInterrupt, as3935LastDistance, as3935LastStatus, currentWindSpeed, currentWindGust, totalRain, bmp180Temperature, bmp180Pressure, bmp180Altitude, bmp180SeaLevel, outsideTemperature, outsideHumidity, currentWindDirection, currentWindDirectionVoltage, HTUtemperature, HTUhumidity) NameError: global name 'bmp180Temperature' is not defined
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $
|
|
|
Post by bccomputer1 on Mar 16, 2018 12:27:51 GMT -8
When I put the mysql setting to False in the config file it keeps running but doesn't send data to the Weather Underground. So I Dropped the Database. Created a new one. Then imported a fresh copy of GroveWeatherPi.sql. It still failed. I also took out the rc.local settings thinking it might be causing an issue. But it still keeps stopping. NameError: global name 'bmp180Temperature' is not defined
|
|
|
Post by SDL on Mar 16, 2018 15:26:08 GMT -8
bcomputer1,
Let's get some base information. What version of the Raspberry Pi are you running? What operating system version are you using ( "cat /etc/os-release")?
Please post that information.
BP
|
|
|
Post by bccomputer1 on Mar 17, 2018 9:18:36 GMT -8
Raspian 8
Raspberry Pi 2
|
|
|
Post by SDL on Mar 17, 2018 15:29:26 GMT -8
bcomputer1,
Please run the command:
cat /etc/os-release
and post the results.
Raspian 8 doesn't mean anything to me. I need the names.
BP
|
|
|
Post by bccomputer1 on Mar 19, 2018 10:13:44 GMT -8
Sorry about that. Here is the exact print out.
pi@raspberrypi:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" pi@raspberrypi:~ $
|
|
|
Post by SDL on Mar 19, 2018 12:55:53 GMT -8
OK. That eliminates any problems with the new Stretch Version. I'll try to run this here shortly and take a look at it.
BP
|
|
|
Post by SDL on Mar 20, 2018 6:24:02 GMT -8
|
|
|
Post by bccomputer1 on Mar 20, 2018 9:19:45 GMT -8
Right On. I'll give that a try today and let you know what happens. Thank You for doing that research for me.
|
|
|
Post by SDL on Mar 20, 2018 17:09:18 GMT -8
I'm running 2.99 now and I'm not seeing the error!
BP
|
|
|
Post by bccomputer1 on Mar 21, 2018 15:32:32 GMT -8
|
|
|
Post by SDL on Mar 22, 2018 8:11:55 GMT -8
Outstanding!
Thanks for all of the help links. I have GWP running on Stretch with Mariadb and the only real issue I found was with setting the root password.
BP
|
|