Hey, so I'm having some trouble figuring out why I'm getting a parse error about my indentation on my return value. It doesn't make much sense since I haven't moved it from the auto generated set up. I tested it in both my script transform and the script console and receive the same error. I would really appreciate some advice on this. Below is my script.
def transform(self, value, quality, timestamp):
Zabbix_server = "XXXXXX"
Zabbix_user = "XXXXX"
Zabbix_password = "XXXXX"
Zabbix_token = "XXXXXX"
api = ZabbixAPI(url = Zabbix_server)
if api.version >= 5.4:
api.login(token = Zabbbix_token)
else:
api.login(user = Zabbix_user, password = Zabbix_password)
users = api.user.get(
output = ['userid', 'name']
)
for user in users:
print(user['name'])
api.logout()
return value
Yes I have, it still gives me the same error. The software automatically puts my cursor there to start anyway so once I attempted it and it didn't work, I just left it as is.
This helped get rid of the parse error. Thank you, I am very new to this software. By chance could explain this syntax error to me as well? "SyntaxError: ("mismatched input ':' expecting RPAREN"
I'm assuming the language doesn't support this type of input in this instance but I'm probably wrong.