Skip to content

Script Issue #2

@zylan1

Description

@zylan1

Hi, thanks for your work here. I'm pretty sure my side of the setup is correct, as with the correct packages installed I've got this pi reporting the UPS details through the NUT upsstats web page & the user running the script gets the correct output when running 'upsc myups', however when attempting to run your script on the pi I get the error below:

prtg@raspberrypi:/var/prtg/scriptsxml $ ./battery_sensor.py
<prtg>
Traceback (most recent call last):
  File "/var/prtg/scriptsxml/./battery_sensor.py", line 235, in <module>
    obtain_status()
  File "/var/prtg/scriptsxml/./battery_sensor.py", line 67, in obtain_status
    print("<text>" + banner_model + banner_serial + "</text>")
UnboundLocalError: local variable 'banner_model' referenced before assignment

Are you still working on this? Do you know if there's been any breaking changes to NUT?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions