Skip to content

FILE_DOES_NOT_EXIST on calling the drone.ftp.list_directory() to fetch internal directories file #690

@jhadevansh08

Description

@jhadevansh08

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions