Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEX6 scan_for_cameras.py not working #59

Open
benbojangles opened this issue May 20, 2019 · 2 comments
Open

NEX6 scan_for_cameras.py not working #59

benbojangles opened this issue May 20, 2019 · 2 comments

Comments

@benbojangles
Copy link

benbojangles commented May 20, 2019

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?

@bjmc
Copy link
Contributor

bjmc commented May 20, 2019

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.

@benbojangles
Copy link
Author

benbojangles commented May 24, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants