easyTello icon indicating copy to clipboard operation
easyTello copied to clipboard

Streamon Error

Open kherath6 opened this issue 5 years ago • 12 comments

I'm trying to use the streamon function, it seems to open up, however it gives me an error message and the programs stops.

My code is given below, would appreciate a response on a possible fix.

from easytello import tello mytello = tello.Tello() Sending command: command Response: b'ok' tello.streamon() Traceback (most recent call last): File "", line 1, in AttributeError: module 'easytello.tello' has no attribute 'streamon' mytello.streamon() Sending command: streamon Response: b'ok' [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] decode_slice_header error [h264 @ 0x7fb3aa252e00] no frame! [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] decode_slice_header error [h264 @ 0x7fb3aa252e00] no frame! [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] decode_slice_header error [h264 @ 0x7fb3aa252e00] no frame! [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] decode_slice_header error [h264 @ 0x7fb3aa252e00] no frame! [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] decode_slice_header error [h264 @ 0x7fb3aa252e00] no frame! [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] decode_slice_header error [h264 @ 0x7fb3aa252e00] no frame! [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] decode_slice_header error [h264 @ 0x7fb3aa252e00] no frame! [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] non-existing PPS 0 referenced [h264 @ 0x7fb3aa252e00] decode_slice_header error [h264 @ 0x7fb3aa252e00] no frame! 2019-07-12 23:18:32.655 python[54965:1536194] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( 0 AppKit 0x00007fff400d67eb -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 378 1 AppKit 0x00007fff400d3bdb -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1479 2 AppKit 0x00007fff40192f95 -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50 3 AppKit 0x00007fff400d360e -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45 4 AppKit 0x00007fff40192f4a -[NSPanel initWithContentRect:styleMask:backing:defer:] + 64 5 QtGui 0x00000001091981fc -[QCocoaPanel initWithContentRect:styleMask:backing:defer:] + 76 6 QtGui 0x000000010919ea81 -[NSWindow(QWidgetIntegration) qt_initWithQWidget:contentRect:styleMask:] + 81 7 QtGui 0x00000001091900da _ZL20qt_mac_create_windowP7QWidgetjmRK5QRect + 423 8 QtGui 0x000000010918fd6a _ZN14QWidgetPrivate18qt_create_root_winEv + 64 9 QtGui 0x0000000109191af3 _ZN14QWidgetPrivate10create_sysElbb + 917 10 QtGui 0x00000001092217fc _ZN7QWidget6createElbb + 580 11 QtGui 0x000000010922051c _ZN14QWidgetPrivate4initEP7QWidget6QFlagsIN2Qt10WindowTypeEE + 362 12 QtGui 0x0000000109220309 _ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE + 121 13 QtGui 0x00000001091a9c03 _ZN14QDesktopWidgetC2Ev + 31 14 QtGui 0x00000001091ebdd4 _ZN12QApplication7desktopEv + 50 15 QtGui 0x00000001091a5cae _Z9flipPointRK7CGPoint + 32 16 QtGui 0x0000000109185af8 _ZN7QCursor3posEv + 46 17 QtGui 0x00000001091fb3f5 _ZN11QMouseEventC2EN6QEvent4TypeERK6QPointN2Qt11MouseButtonE6QFlagsIS6_ES7_INS5_16KeyboardModifierEE + 79 18 QtGui 0x00000001096c4204 _ZN20QGraphicsViewPrivateC2Ev + 296 19 QtGui 0x00000001096c76c5 _ZN13QGraphicsViewC2EP7QWidget + 37 20 cv2.cpython-37m-darwin.so 0x000000010382db2f _ZN15DefaultViewPortC2EP8CvWindowi + 31 21 cv2.cpython-37m-darwin.so 0x00000001038291bd _ZN8CvWindowC2E7QStringi + 397 22 cv2.cpython-37m-darwin.so 0x0000000103820ed3 _ZN11GuiReceiver12createWindowE7QStringi + 227 23 cv2.cpython-37m-darwin.so 0x0000000103820d35 cvNamedWindow + 533 24 cv2.cpython-37m-darwin.so 0x0000000103823308 _ZN11GuiReceiver9showImageE7QStringPv + 168 25 cv2.cpython-37m-darwin.so 0x00000001038231be cvShowImage + 558 26 cv2.cpython-37m-darwin.so 0x000000010381bb8f _ZN2cv6imshowERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_11_InputArrayE + 463 27 cv2.cpython-37m-darwin.so 0x0000000102c5e318 ZL18pyopencv_cv_imshowP7_objectS0_S0 + 424 28 python 0x00000001021f91b8 _PyMethodDef_RawFastCallKeywords + 392 29 python 0x0000000102335e42 call_function + 306 30 python 0x0000000102333aec _PyEval_EvalFrameDefault + 46092 31 python 0x00000001021f88d5 function_code_fastcall + 117 32 python 0x00000001021fbce2 method_call + 130 33 python 0x00000001021f9752 PyObject_Call + 130 34 python 0x0000000102333d58 _PyEval_EvalFrameDefault + 46712 35 python 0x00000001021f88d5 function_code_fastcall + 117 36 python 0x0000000102335dc7 call_function + 183 37 python 0x0000000102333a56 _PyEval_EvalFrameDefault + 45942 38 python 0x00000001021f88d5 function_code_fastcall + 117 39 python 0x0000000102335dc7 call_function + 183 40 python 0x0000000102333a56 _PyEval_EvalFrameDefault + 45942 41 python 0x00000001021f88d5 function_code_fastcall + 117 42 python 0x00000001021fbce2 method_call + 130 43 python 0x00000001021f9752 PyObject_Call + 130 44 python 0x00000001024178cb t_bootstrap + 123 45 python 0x000000010239e707 pythread_wrapper + 39 46 libsystem_pthread.dylib 0x00007fff6eaf32eb _pthread_body + 126 47 libsystem_pthread.dylib 0x00007fff6eaf6249 _pthread_start + 66 48 libsystem_pthread.dylib 0x00007fff6eaf240d thread_start + 13 ) 2019-07-12 23:18:32.726 python[54965:1536194] WARNING: nextEventMatchingMask should only be called from the Main Thread! This will throw an exception in the future. 2019-07-12 23:18:32.726 python[54965:1536194] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /BuildRoot/Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1575.12/Foundation/Misc.subproj/NSUndoManager.m:361 2019-07-12 23:18:32.728 python[54965:1536194] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /BuildRoot/Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1575.12/Foundation/Misc.subproj/NSUndoManager.m:361 2019-07-12 23:18:32.732 python[54965:1536194] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.' *** First throw call stack: ( 0 CoreFoundation 0x00007fff42a87cfd __exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff6d131a17 objc_exception_throw + 48 2 CoreFoundation 0x00007fff42aa2a1a +[NSException raise:format:arguments:] + 98 3 Foundation 0x00007fff44d41c85 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194 4 Foundation 0x00007fff44c74cfa +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 473 5 AppKit 0x00007fff4004f915 -[NSApplication run] + 916 6 QtGui 0x00000001091abe44 _ZN26QEventDispatcherMacPrivate22ensureNSAppInitializedEv + 128 7 QtGui 0x00000001091ab5ff _ZN19QEventDispatcherMac13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 777 8 QtCore 0x0000000109e0dfdc _ZN16QCoreApplication13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 80 9 cv2.cpython-37m-darwin.so 0x00000001038208ef cvWaitKey + 207 10 cv2.cpython-37m-darwin.so 0x0000000103820ef7 _ZN11GuiReceiver12createWindowE7QStringi + 263 11 cv2.cpython-37m-darwin.so 0x0000000103820d35 cvNamedWindow + 533 12 cv2.cpython-37m-darwin.so 0x0000000103823308 _ZN11GuiReceiver9showImageE7QStringPv + 168 13 cv2.cpython-37m-darwin.so 0x00000001038231be cvShowImage + 558 14 cv2.cpython-37m-darwin.so 0x000000010381bb8f _ZN2cv6imshowERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_11_InputArrayE + 463 15 cv2.cpython-37m-darwin.so 0x0000000102c5e318 ZL18pyopencv_cv_imshowP7_objectS0_S0 + 424 16 python 0x00000001021f91b8 _PyMethodDef_RawFastCallKeywords + 392 17 python 0x0000000102335e42 call_function + 306 18 python 0x0000000102333aec _PyEval_EvalFrameDefault + 46092 19 python 0x00000001021f88d5 function_code_fastcall + 117 20 python 0x00000001021fbce2 method_call + 130 21 python 0x00000001021f9752 PyObject_Call + 130 22 python 0x0000000102333d58 _PyEval_EvalFrameDefault + 46712 23 python 0x00000001021f88d5 function_code_fastcall + 117 24 python 0x0000000102335dc7 call_function + 183 25 python 0x0000000102333a56 _PyEval_EvalFrameDefault + 45942 26 python 0x00000001021f88d5 function_code_fastcall + 117 27 python 0x0000000102335dc7 call_function + 183 28 python 0x0000000102333a56 _PyEval_EvalFrameDefault + 45942 29 python 0x00000001021f88d5 function_code_fastcall + 117 30 python 0x00000001021fbce2 method_call + 130 31 python 0x00000001021f9752 PyObject_Call + 130 32 python 0x00000001024178cb t_bootstrap + 123 33 python 0x000000010239e707 pythread_wrapper + 39 34 libsystem_pthread.dylib 0x00007fff6eaf32eb _pthread_body + 126 35 libsystem_pthread.dylib 0x00007fff6eaf6249 _pthread_start + 66 36 libsystem_pthread.dylib 0x00007fff6eaf240d thread_start + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6 Screen Shot 2019-07-12 at 11 23 23 PM Screen Shot 2019-07-12 at 11 23 31 PM Screen Shot 2019-07-12 at 11 23 42 PM Screen Shot 2019-07-12 at 11 23 52 PM Screen Shot 2019-07-12 at 11 24 16 PM

kherath6 avatar Jul 13 '19 06:07 kherath6

Hi, what OS are you using? This seems to be an issue with calling openCV so the environment may come into play

ezrafielding avatar Jul 31 '19 10:07 ezrafielding

Hi Virodroid,

I'm using Mac os. I have all the packages installed in the environment.

kherath6 avatar Aug 02 '19 06:08 kherath6

I haven't been able to test easyTello on MacOS yet. Perhaps it doesn't like the way I'm calling OpenCV. I'll see if I can track down a Mac to do some testing on in future. Everything seems to work fine on Windows 10 and Ubuntu

ezrafielding avatar Aug 23 '19 07:08 ezrafielding

Comments @0bscur3 0bscur3 commented 13 days ago

Hi,

I was trying to get the example.py to work, but video stream does not seem to work. I am using python 3.6.9 on Mac OS.

This is my stdout:

pygame 1.9.4 Hello from the pygame community. https://www.pygame.org/contribute.html Send command: command Response: ok Send command: speed 10 Response: ok Send command: streamoff Response: ok Send command: streamon Response: ok [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] non-existing PPS 0 referenced [h264 @ 0x7f86968c6600] decode_slice_header error [h264 @ 0x7f86968c6600] no frame! [h264 @ 0x7f869801c800] error while decoding MB 48 23, bytestream -5 [h264 @ 0x7f869801fe00] error while decoding MB 30 41, bytestream -8

Thanks! @acdgr8 acdgr8 commented 1 hour ago

Hi, I'm getting a similar error when trying to switch on the stream. Interestingly, I am able to extract frames out of it using the following code - from djitellopy import Tello import cv2 import time tello =Tello() tello.connect() tello.takeoff() tello.streamon() count = 0 vidcap = cv2.VideoCapture(tello.get_udp_video_address()) success,image = vidcap.read() success = True while success: vidcap.set(cv2.CAP_PROP_POS_MSEC,(count*1000)) success,image = vidcap.read() print ('Read a new frame: ', success) cv2.imwrite("./img/frame%d.jpg" % count, image) # save frame as JPEG file count = count + 5

And the frames are being stored correctly. Can someone please help out why the videostream is not being displayed in a separate window. Thanks in advance!

acdgr8 avatar Aug 28 '19 06:08 acdgr8

Exactly the same issue here. Any progress on this please?

tomschofield avatar Nov 08 '19 10:11 tomschofield

Me too, I try too run it with macOS, h264 @ 0x7f99b384ac00] non-existing PPS 0 referenced [h264 @ 0x7f99b384ac00] non-existing PPS 0 referenced [h264 @ 0x7f99b384ac00] decode_slice_header error [h264 @ 0x7f99b384ac00] no frame! [h264 @ 0x7f99b384ac00] non-existing PPS 0 referenced [h264 @ 0x7f99b384ac00] non-existing PPS 0 referenced [h264 @ 0x7f99b384ac00] decode_slice_header error [h264 @ 0x7f99b384ac00] no frame! .... and so on

rdarmoul avatar Jan 14 '20 17:01 rdarmoul

Me too, I try too run it with macOS, h264 @ 0x7f99b384ac00] non-existing PPS 0 referenced [h264 @ 0x7f99b384ac00] non-existing PPS 0 referenced [h264 @ 0x7f99b384ac00] decode_slice_header error [h264 @ 0x7f99b384ac00] no frame! [h264 @ 0x7f99b384ac00] non-existing PPS 0 referenced [h264 @ 0x7f99b384ac00] non-existing PPS 0 referenced [h264 @ 0x7f99b384ac00] decode_slice_header error [h264 @ 0x7f99b384ac00] no frame! .... and so on

Tengo el mismo problema.... ¿Has encontrado alguna solución? Gracias

manujimele avatar May 22 '20 08:05 manujimele

@Virodroid i get the same errors and issue. seems like all 3rd party tello libraries needs to be updated, maybe caused by latest tello firmware update

ricafort avatar Jul 06 '20 04:07 ricafort

Having the same issue here. Any news on this?

faaip avatar Nov 24 '20 11:11 faaip

@Virodroid any updates on this issue?

ramujin avatar Jan 20 '21 01:01 ramujin

Unfortunately, I'm not currently in possession of a DJI Tello to continue development of this library. So I won't be able to make or test any updates going forward. That's why this repo isn't really under "active" development anymore.

ezrafielding avatar Jan 22 '21 10:01 ezrafielding

Turns out the issue for me was that opencv was opening windows in a separate thread. MacOS does not allow (or work well with) GUI operations outside the main thread. Workaround was to move all GUI operations to the main thread.

skomatin avatar Jan 27 '21 20:01 skomatin