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

Library throws exception at some functions #224

Open
Jere2k03 opened this issue Aug 8, 2024 · 0 comments
Open

Library throws exception at some functions #224

Jere2k03 opened this issue Aug 8, 2024 · 0 comments

Comments

@Jere2k03
Copy link

Jere2k03 commented Aug 8, 2024

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

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

1 participant