sony_camera_api icon indicating copy to clipboard operation
sony_camera_api copied to clipboard

NEX6 scan_for_cameras.py not working

Open benbojangles opened this issue 6 years ago • 2 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?

benbojangles avatar May 20 '19 22:05 benbojangles

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.

bjmc avatar May 20 '19 22:05 bjmc

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?

benbojangles avatar May 24 '19 00:05 benbojangles