What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

SyntaxError: invalid syntax: _channels: list = [] on result.py

Votes:

0

Hi,

We are adapting our Python to run on a PTRG Python Sensor, and first of all I tried to see the result of the example.py script , so I can use the same methods on out when we run it on PRTG Python environment via command Prompt on (C:\Program Files (x86)\PRTG Network Monitor\python\Scripts>).

First It was missing the file with the libs "prtg.sensor.result" and "prtg.sensor.unit". I found some related issues on Paessler KB, so i copied the prtg folder on "C:\Program Files (x86)\PRTG Network Monitor\python\Lib\site-packages" to the same folder where the example script is, but now I´m facing the error:

File "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\python\prtg\sensor\result.py", line 52 _channels: list = [] ^ SyntaxError: invalid syntax

Ps: This example.py script is not commented, it would be helpful

example-py json-output testing

Created on Nov 9, 2020 8:30:05 PM



1 Reply

Votes:

0

Hi,

please open a support ticket, so that we can take a closer look on your issue. Please refer to this KB article, when you open the ticket.


Kind regards,
Matthias Kupfer - Team Tech Support

Created on Nov 10, 2020 10:35:24 AM by  Matthias Kupfer [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.