0

I'm facing a 'Did not receive state packet from Tello' error when trying to execute the below code in anaconda environment. Can someone help on this please?

from djitellopy import tello
from time import sleep

me = tello.Tello()
me.connect()
print(me.get_battery())

me.takeoff()
me.send_rc_control(0,20,0,0)
sleep(2)
me.send_rc_control(0,0,0,0)
me.land()

Full error trace:

[INFO] tello.py - 122 - Tello instance was initialized. Host: '192.168.10.1'. Port: '8889'.
[INFO] tello.py - 437 - Send command: 'command'
[INFO] tello.py - 461 - Response command: 'ok'
Traceback (most recent call last):
  File "C:/Users/Lenovo/PycharmProjects/OpencvPython/venv/basicmovementconda.py", line 5, in <module>
    me.connect()
  File "C:\Users\Lenovo\anaconda3\envs\Tellotest\lib\site-packages\djitellopy\enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\Lenovo\anaconda3\envs\Tellotest\lib\site-packages\djitellopy\tello.py", line 546, in connect
    raise Exception('Did not receive a state packet from the Tello')
Exception: Did not receive a state packet from the Tello
Robert
  • 7,394
  • 40
  • 45
  • 64

2 Answers2

0

I had the same issue and I'm on a 3.9 environment on Linux and I had my firewall turned on, so I turn it off and it worked!

0

If you are on Mac, try to add Anaconda to except blocking from FireWall. Additionally, use a different IDE. If you are on VSCode, change it with Spyder. Then you should be good to go.