Parrot-Developers / sequoia-ptpy

Python library used to communicate with PTP devices like Parrot Sequoia
BSD 3-Clause "New" or "Revised" License
54 stars 36 forks source link

IP connection problem #20

Open milani opened 6 years ago

milani commented 6 years ago

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 commented 6 years ago

Hi @milani ,

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

Thanks,

milani commented 6 years ago

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

Sly-Guo commented 3 years ago

Have u fixed this? I met the same issue.