damiafuentes / DJITelloPy

DJI Tello drone python interface using the official Tello SDK. Feel free to contribute!
MIT License
1.26k stars 491 forks source link

OSError: [WinError 6] #207

Open CodeLancerA opened 1 year ago

CodeLancerA commented 1 year ago

Bro,I am working with a Tello drone, utilizing the DJITelloPy library to control it. However, I'm encountering an error when attempting to close the video stream and destroy the Tello instance. The error message I receive is OSError: [WinError 6] The handle is invalid. Additionally, during the video streaming, I am facing issues with video decoding displaying errors like non-existing PPS 0 referenced and decode_slice_header error. I am not able to capture images during this process. I've successfully initialized the Tello instance and sent commands like streamon, takeoff, and land which were acknowledged without issue. This is the code i run: import cv2 from djitellopy import Tello

tello = Tello() tello.connect()

tello.streamon() frame_read = tello.get_frame_read()

tello.takeoff() cv2.imwrite("picture.png", frame_read.frame)

tello.land()

Bitahsni commented 10 months ago

Hi, I had the same issue. When capturing the image, cv2.imshow() shows a black window!I assume this problem refers to your PC! because when I run the script on another PC, it works as well. But I don't know what the problem is. Have you solved this problem?