-
Notifications
You must be signed in to change notification settings - Fork 240
Closed
mavlink/MAVSDK
#2309Labels
Description
How to Recreate
Code 1
#!/usr/bin/env python3
import asyncio
from mavsdk import System
async def run():
drone = System(mavsdk_server_address='localhost', port=50051)
await drone.connect(system_address="serial:///dev/ttyACM1:57600")
print("Waiting for drone to connect...")
async for state in drone.core.connection_state():
if state.is_connected:
print(f"-- Connected to drone!")
break
print("directory list", await drone.ftp.list_directory("/"))
# Run the asyncio loop
asyncio.run(run())
Output 1
directory list ['Dbin', 'Ddev', 'Detc', 'Dfs', 'Dobj', 'Dproc']
Code 2
#!/usr/bin/env python3
import asyncio
from mavsdk import System
async def run():
drone = System(mavsdk_server_address='localhost', port=50051)
await drone.connect(system_address="serial:///dev/ttyACM1:57600")
print("Waiting for drone to connect...")
async for state in drone.core.connection_state():
if state.is_connected:
print(f"-- Connected to drone!")
break
print("directory list", await drone.ftp.list_directory("/Dbin"))
if __name__ == "__main__":
# Run the asyncio loop
asyncio.run(run())
Output 2
raise FtpError(result, "list_directory()", remote_dir)
mavsdk.ftp.FtpError: FILE_DOES_NOT_EXIST: 'File Does Not Exist'; origin: list_directory(); params: ('/Dbin',)
Even for any folder given , I am getting the same error