Bloodevil / sony_camera_api

sony camera remote api

Home Page:http://developer.sony.com/develop/cameras/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NEX6 scan_for_cameras.py not working

benbojangles opened this issue · comments

hey there
after connecting to NEX6 wifi ap i try to run scan_for_cameras.py
i am getting the error message:

Traceback (most recent call last):
File "scan_for_cameras.py", line 5, in
cameras = search.discover(5)
File "build/bdist.linux-armv7l/egg/pysony.py", line 53, in discover
File "build/bdist.linux-armv7l/egg/pysony.py", line 69, in _listen_for_discover
UnboundLocalError: local variable 'host' referenced before assignment

What am i doing wrong please?

I think there might be some issues with _listen_for_discover(), you could try my discovery branch and see if you get any better results with that.

So it appears that my install was not perfect.
it installed for python3 and it appears pysony is made for python2.7
I remove using:
sudo pip uninstall pysony

i reinstall using:
sudo pip2 install pysony

then install flask dependency:
sudo pip2 install flask

I am able to scan using: scan_for_cameras.py

I get the following:

Available cameras: [('HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=1800\r\nEXT: \r\nLOCATION: http://192.168.122.1:61000/scalarwebapi_dd.xml\r\nSERVER: UPnP/1.0 MINT-X/1.8.1\r\nST: urn:schemas-sony-com:service:ScalarWebAPI:1\r\nUSN: uuid:000000001000-XXXX-8000-XXXXXXXXXXXX::urn:schemas-sony-com:service:ScalarWebAPI:1\r\n\r\n', ('192.168.122.1', 52265))]

Traceback (most recent call last):
  File "scan_for_cameras.py", line 13, in <module>
    print("Checking Camera: %s" % x)
TypeError: not all arguments converted during string formatting

what do i do next for example set up liveview?