Skip to content

couple functions raise errors. #238

@ar-cyber

Description

@ar-cyber
[INFO] tello.py - 129 - Tello instance was initialized. Host: '192.168.10.1'. Port: '8889'.
[INFO] tello.py - 438 - Send command: 'command'
[INFO] tello.py - 462 - Response command: 'ok'
Exception in thread Thread-3 (CheckBatteryLevel):
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2544.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2544.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "c:\Users\25RobAnd\Dev\TelloPy\TelloLibActual.py", line 17, in CheckBatteryLevel
    if self.get_battery() <= 5:
       ^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 404, in get_battery
    return self.get_state_field('bat')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 249, in get_state_field        
    raise TelloException('Could not get state property: {}'.format(key))
djitellopy.tello.TelloException: Could not get state property: bat
[INFO] tello.py - 438 - Send command: 'streamon'
[INFO] tello.py - 462 - Response streamon: 'ok'
[INFO] tello.py - 438 - Send command: 'speed 80'
[INFO] tello.py - 462 - Response speed 80: 'ok'
[INFO] tello.py - 438 - Send command: 'takeoff'
[INFO] tello.py - 462 - Response takeoff: 'ok'
[INFO] tello.py - 438 - Send command: 'streamon'
[INFO] tello.py - 462 - Response streamon: 'ok'
Traceback (most recent call last):
  File "c:\Users\25RobAnd\Dev\TelloPy\main.py", line 30, in <module>
    print(tello.get_temperature() if tello.get_temperature() <= 40 else exec("exit()"))
                                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 365, in get_temperature        
    templ = self.get_lowest_temperature()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 351, in get_lowest_temperature 
    return self.get_state_field('templ')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 249, in get_state_field        
    raise TelloException('Could not get state property: {}'.format(key))
djitellopy.tello.TelloException: Could not get state property: templ
Exception ignored in: <function Tello.__del__ at 0x00000209AF11D620>
Traceback (most recent call last):
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 1028, in __del__
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 1014, in end
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 581, in land
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 480, in send_control_command   
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
  File "C:\Users\25RobAnd\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\djitellopy\tello.py", line 436, in send_command_with_return
OSError: [WinError 6] The handle is invalid

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