finish06 / pyunifi

https://unifi-sdn.ubnt.com/
MIT License
226 stars 100 forks source link

NameError: global name 'urllib' is not defined #21

Closed oneoffdallas closed 4 years ago

oneoffdallas commented 6 years ago

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

finish06 commented 5 years ago

Did you ever figure out the issue? Sorry I did not reply more timely.

finish06 commented 4 years ago

Closing due to inactivity.