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

IP connection problem #20

Open
milani opened this issue Jan 19, 2018 · 3 comments
Open

IP connection problem #20

milani opened this issue Jan 19, 2018 · 3 comments

Comments

@milani
Copy link

milani commented Jan 19, 2018

I am running the following code:

from ptpy import PTPy
from ptpy.transports.ip import IPTransport
camera = PTPy(transport=IPTransport,device="192.168.156.1")

I get this error:

D 19 ptpy[MainThread:__new__:99] New PTPy
D 20 ptpy.ptp[MainThread:__init__:705] Init PTP
D 20 ptpy.ptp[MainThread:_set_endian:629] Set PTP endianness
D 21 ptpy.transports.ip[MainThread:__init__:77] Init IP
D 21 ptpy.transports.ip[MainThread:recv:600] RECV GetDeviceInfo
D 21 ptpy.transports.ip[MainThread:__setup_connection:194] Establishing PTP/IP connection with 192.168.156.1:15740
E 24 ptpy.transports.ip[MainThread:__implicit_session:115] <lambda>() takes exactly 3 arguments (2 given)
E 24 ptpy.ptp[MainThread:recv:801] Failed to open PTP/IP implicit session
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    camera = PTPy(transport=IPTransport,device="192.168.156.1")
  File "Experiments/sequoia-ptpy/ptpy/__init__.py", line 114, in __new__
    device_info = plain_camera.get_device_info()
  File "Experiments/sequoia-ptpy/ptpy/ptp.py", line 953, in get_device_info
    response = self.recv(ptp)
  File "Experiments/sequoia-ptpy/ptpy/ptp.py", line 802, in recv
    raise e
ptpy.ptp.PTPError: Failed to open PTP/IP implicit session
@domenzain
Copy link
Contributor

Hi @milani ,

Which device are you attempting to connect to?
Are you testing on master?

Thanks,

@milani
Copy link
Author

milani commented Jan 24, 2018

I have a nikon d7200, I connected to it via wifi then ran the above code.
Yes, I am running master.

@Sly-Guo
Copy link

Sly-Guo commented Oct 27, 2020

Have u fixed this?
I met the same issue.

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

3 participants