finish06 / pyunifi

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

ImportError: No module named parse #19

Closed ScrewLooseDan closed 6 years ago

ScrewLooseDan commented 6 years ago

I'm not that familiar with python, so there might be an obvious answer to this; my apologies if that is the case.

I receive the following error while running unifi-ls-clients:

Traceback (most recent call last): File "/usr/local/bin/unifi-ls-clients", line 5, in from pyunifi.controller import Controller File "/usr/local/lib/python2.7/dist-packages/pyunifi/controller.py", line 6, in import urllib.parse ImportError: No module named parse

I have urllib3 installed and parse

$ pip list --format=columns | grep -e 'urllib' -e 'parse' parse 1.6.6
parsedatetime 1.4
urllib3 1.22

I worked around the issue by making the import statement in controller.py, line 6: import urllib.parse -> import parse

It works like this, but I'm not sure why and I'm not sure if this work around is appropriate.

finish06 commented 6 years ago

This should be corrected. Please pull the repo and try again. Thanks!

ScrewLooseDan commented 6 years ago

Thanks, that appeared to do it!