by alvinshih
hi guys:
I had installed the python program on Windows 10, and made sure the output is json format.
But it still got error message: Plugin output is empty or not in Json format \n
And i work well with batch and powershell.
This is my python script(just for testing):
#!"C:/Program Files/Python310/python.exe"
source = '{"plugin_version" : "1","data" : {"Packets recieved":10,"Packets sent":4,"Bandwidth utilization":12,"Speed":87},"units" : {"Packets recieved":"sec","Packets sent":"sec","Bandwidth utilization":"Kbps","Speed":"Mbps"},"heartbeat_required" : "True","displayname" : "Network Traffic","msg" : "High Bandwidth Utilization"}'
print(source)
source = '{"plugin_version" : "1","data" : {"Packets recieved":10,"Packets sent":4,"Bandwidth utilization":12,"Speed":87},"units" : {"Packets recieved":"sec","Packets sent":"sec","Bandwidth utilization":"Kbps","Speed":"Mbps"},"heartbeat_required" : "True","displayname" : "Network Traffic","msg" : "High Bandwidth Utilization"}'
print(source)
Any one has idea?
Alvin.
Like (2)
Reply
Replies (1)
Please remove the first line of the script. We recommend following the below-mentioned KBase
https://support.site24x7.com/portal/en/kb/articles/run-python-plugin-scripts-in-windows-servers
Like (0)
Reply