I'm receiving the following errors when I run a simple get_alerts_unarchived() call. All other API calls and sample scripts work perfectly. This seems to be the only call that references urllib. Tested in 2.X and 3.X. It seems the format for urllib changed in 3 so that may be related.
File "/usr/lib/python2.7/site-packages/pyunifi/controller.py", line 166, in get_alerts_unarchived
params = urllib.urlencode({'json': js})
NameError: global name 'urllib' is not defined
File "/usr/lib/python3.6/site-packages/pyunifi/controller.py", line 166, in get_alerts_unarchived
params = urllib.urlencode({'json': js})
NameError: name 'urllib' is not defined
I'm receiving the following errors when I run a simple get_alerts_unarchived() call. All other API calls and sample scripts work perfectly. This seems to be the only call that references urllib. Tested in 2.X and 3.X. It seems the format for urllib changed in 3 so that may be related.
File "/usr/lib/python2.7/site-packages/pyunifi/controller.py", line 166, in get_alerts_unarchived params = urllib.urlencode({'json': js}) NameError: global name 'urllib' is not defined
File "/usr/lib/python3.6/site-packages/pyunifi/controller.py", line 166, in get_alerts_unarchived params = urllib.urlencode({'json': js}) NameError: name 'urllib' is not defined