Skip to content

Library throws exception at some functions #224

@Jere2k03

Description

@Jere2k03

Hi,
I was able to control my Tello with djitellopy library for most of the time.
However, from time to time, I would get this error message below.

What could be the problem here?

Conditions:

  • Windows 10
  • Python 3.11.9
  • Both Tello App and Tello firmware has upgraded to latest version.
  • Tello is calibrated with the app
  • Battery is full
  • Tellos is right next to me (less than 1meter away)

My Code:
from djitellopy import Tello

tello = Tello()

tello.connect()
tello.takeoff()

tello.flip_back()

tello.land()

The Error:
[INFO] tello.py - 438 - Send command: 'flip b'
[INFO] tello.py - 462 - Response flip b: 'error'
Traceback (most recent call last):
File "c:\Projekte\ITA_Semester_4\DroneControl\src\droneControl\DroneControl\tellotest.py", line 8, in
tello.flip_back()
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 705, in flip_back
self.flip("b")
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 685, in flip
self.send_control_command("flip {}".format(direction))
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 487, in send_control_command
self.raise_result_error(command, response)
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 529, in raise_result_error
raise TelloException("Command '{}' was unsuccessful for {} tries. Latest response:\t'{}'"
djitellopy.tello.TelloException: Command 'flip b' was unsuccessful for 4 tries. Latest response: 'error'
Exception ignored in: <function Tello.del at 0x0000027620D32DE0>
Traceback (most recent call last):
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 1028, in del
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 1014, in end
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 581, in land
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 480, in send_control_command
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
File "c:\Projekte\ITA_Semester_4\DroneControl.venv\Lib\site-packages\djitellopy\tello.py", line 436, in send_command_with_return
OSError: [WinError 6] Das Handle ist ungültig

Thanks in advance for helping!! :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions