keshavdv / unifi-cam-proxy

Enable non-Ubiquiti cameras to work with Unifi NVR
MIT License
1.72k stars 236 forks source link

Which python? Which Pip? 3.7+ #40

Closed DrJeff closed 3 years ago

DrJeff commented 3 years ago

I see that it requires python 3+ but uses pip to install so is it installing via 2.7 or 3 when I run it I get these errors

2021-06-10 05:26:22 unifi-cam-proxy Core[9838] DEBUG Message contents: {u'from': u'UniFiVideo', u'functionName': u'ubnt_avclient_hello', u'inResponseTo': 1, u'to': u'ubnt_avclient', u'messageId': 10014, u'payload': {u'controllerUuid': u'c0f5d6fd-4dcc-4641-acb4-e8c7518bbc4f', u'overrideUuid': True, u'controllerName': u'UDM Pro Home', u'controllerVersion': u'1.18.1', u'protocolVersion': 67}}
Traceback (most recent call last):
  File "/usr/local/bin/unifi-cam-proxy", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/unifi/main.py", line 58, in main
    c.run()
  File "/usr/local/lib/python2.7/dist-packages/unifi/core.py", line 759, in run
    reconnect = self.process(ws, msg)
  File "/usr/local/lib/python2.7/dist-packages/unifi/core.py", line 666, in process
    if m["responseExpected"] == False and m["functionName"] not in [
KeyError: 'responseExpected'

Should I use pip3 to install unifi-cam-proxy? because I tried but wont install

root@unifi-cam-proxy:~# pip3 install unifi-cam-proxy
Collecting unifi-cam-proxy
  Using cached https://files.pythonhosted.org/packages/8c/01/0ea751bf33959dc5353679656578bcda79d89edf8ad201fb7541984eddb8/unifi-cam-proxy-0.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-thj5aqb1/unifi-cam-proxy/setup.py", line 11, in <module>
        long_description = open('README.md').read(),
    FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

Not sure what to try next

keshavdv commented 3 years ago

As you mentioned, this library is Python 3.7+. You can verify which version pip is running on with the following:

~ ❯ pip3 --version                                                                                                                                                                                        ⏎
pip 20.3.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
~ ❯

I'd suggest trying to find a newer version of python for your platform or trying out the docker images instead.

DrJeff commented 3 years ago

Got Updated now to the next problem only Buck plays not my cams