roscoe81/enviro-monitor

NameError: name 'aio_version_text_format' is not defined

jdv213 opened this issue · 2 comments

I have been hitting this wall all day when Setting up Premium Plus Adafruit IO:

Sending Startup Versions to Adafruit IO Code: 6.11 - Gen Config: Base Config
Traceback (most recent call last):
  File "/home/pi/enviro-monitor/Northcliff_AQI_Monitor_Gen.py", line 2198, in <module>
    feed_resp = send_data_to_aio(aio_version_text_format, version_text)
NameError: name 'aio_version_text_format' is not defined

Any tips?
My knowledge is next to zero as this is my first project...
I have followed all the guidelines - let me know if specific screenshots would help...

Thanks :)

A few questions to help me get a picture of the potential issue...

Did you get an "Invalid Adafruit IO Package" error?
Have you equipped your Enviro Monitor with an SGP30 sensor? You need that to get the eCO2 and TVOC levels for the Premium Plus Adafruit IO package.
What is "aio_package" set to in your config.json file? It should be "Premium Plus"
What is "enable_eco2_tvoc" set to in your config.json file? It should be true

Thank you very much for the quick reply!

Last night I did a bit more testing and I suspect my SGP30 might be a culprit as I received it 'used' with some pretty bad soldering and know it was removed from another project. I placed an order for 2 new ones this morning, so will only have them in a week, but in the meantime:

What is "aio_package" set to in your config.json file? It should be "Premium Plus - Yes" What is "enable_eco2_tvoc" set to in your config.json file? It should be true - set to true

I actually changed the 'Premium Plus' to 'Premium' to see if i could get onto the next steps and received some more errors which are linked a) the noise feature and b) to the location (I added Spain as a timezone and also added it to the custom locations field along with GPS coordinates):

Traceback (most recent call last): File "/home/pi/enviro-monitor/Northcliff_AQI_Monitor_Gen.py", line 2365, in <module> outdoor_noise_max_datetime, outdoor_noise_values, outdoor_noise_freq_values) File "/home/pi/enviro-monitor/Northcliff_AQI_Monitor_Gen.py", line 965, in display_results air_quality_data_no_gas, icon_air_quality_levels, gas_sensors_warm, own_noise_level, own_noise_max) File "/home/pi/enviro-monitor/Northcliff_AQI_Monitor_Gen.py", line 1334, in display_icon_weather_aqi progress, period, day, local_dt = sun_moon_time(city_name, time_zone) File "/home/pi/enviro-monitor/Northcliff_AQI_Monitor_Gen.py", line 1240, in sun_moon_time local_dt = utc_dt.astimezone(pytz.timezone(time_zone)) File "/usr/local/lib/python3.7/dist-packages/pytz-2020.1-py3.7.egg/pytz/__init__.py", line 181, in timezone raise UnknownTimeZoneError(zone) pytz.exceptions.UnknownTimeZoneError: 'Spain'

Will play around with these errors until the new sensor arrives and will surely have more questions then :)
Feel free to close this issue for now and thanks again