frtz13 / UPSPlus_mqtt

GNU General Public License v3.0
19 stars 6 forks source link

print(DATA) NameError: name 'DATA' is not defined #26

Closed ArjenR49 closed 2 years ago

ArjenR49 commented 2 years ago

Traceback (most recent call last): File "/home/pi/UPSPlus_MQTT/fanShutDownUps.py", line 757, in get_UPS_status_and_check_battery_voltage(MQTT_client) File "/home/pi/UPSPlus_MQTT/fanShutDownUps.py", line 587, in get_UPS_status_and_check_battery_voltage upsplus.send_UPS_status_data() File "/home/pi/UPSPlus_MQTT/fanShutDownUps.py", line 383, in send_UPS_status_data print(DATA) NameError: name 'DATA' is not defined

In your code the print command is on line 363**** ...

I changed the argument to tel_data and got the expected debugging output.

frtz13 commented 2 years ago

line 363 is commented out. you are right: when you remove the comment sign, you should correct the argument, a leftover from an old version of the code.