# Error running the deepstream python apps

**URL:** <https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016>\
**Category:** DeepStream SDK\
**Created:** [March 4, 2021, 6:08am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016 "2021-03-04T06:08:00Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![riyan.dcosta](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/riyan.dcosta/32/73629_2.png) [@riyan.dcosta](https://forums.developer.nvidia.com/u/riyan.dcosta)\
**Post date:** [March 4, 2021, 6:08am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/1 "2021-03-04T06:08:00Z")

</div>

Device : jetson nano 2gb  
Jetpack: 4.5.1  
Deepstream: 5.1  
SOC : tegra 210

Error:

0:02:53.891197209 3908 0x30a53de0 WARN nvinfer gstnvinfer.cpp:1812:gst\_nvinfer\_submit\_input\_buffer: error: streaming stopped, reason error (-5)  
Error: gst-stream-error-quark: Internal data stream error. (1): /dvs/git/dirty/git-master\_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(1812): gst\_nvinfer\_submit\_input\_buffer (): /GstPipeline:pipeline0/GstNvInfer:secondary3-nvinference-engine:  
streaming stopped, reason error (-5)

Command: root@jetson2gb:/opt/nvidia/deepstream/deepstream-5.1/samples/deepstream\_python\_apps/apps/deepstream-test2# python3 deepstream\_test\_2.py …/…/…/streams/sample\_720p.h264

I have followed all the prerequisits and installed all the deendent modules, yet the python app is giving this error while running the test apps. The same error is present for test\_1.py file.

Need help to fix this error and any hints would be wonderful for me to try out.

I had cloned the github repo for this python files to run.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [March 4, 2021, 7:45am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/3 "2021-03-04T07:45:33Z")

</div>

Can you post the whole log?

---

<div class="post-metadata">

**Author:** ![riyan.dcosta](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/riyan.dcosta/32/73629_2.png) [@riyan.dcosta](https://forums.developer.nvidia.com/u/riyan.dcosta)\
**Post date:** [March 4, 2021, 9:03am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/4 "2021-03-04T09:03:32Z")

</div>

root@jetson2gb:/opt/nvidia/deepstream/deepstream-5.1/samples/deepstream\_python\_apps/apps/deepstream-test1# python3 deepstream\_test\_1.py …/…/…/streams/sample\_720p.h264  
Creating Pipeline

Creating Source

Creating H264Parser

Creating Decoder

Creating EGLSink

Playing file …/…/…/streams/sample\_720p.h264  
Adding elements to Pipeline

Linking elements in the Pipeline

Starting pipeline

Using winsys: x11  
Opening in BLOCKING MODE  
Opening in BLOCKING MODE  
ERROR: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-5.1/samples/deepstream\_python\_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary\_Detector/resnet10.caffemodel\_b1\_gpu0\_int8.engine open error  
0:00:05.151360970 7812 0x15be1c40 WARN nvinfer gstnvinfer.cpp:616:gst\_nvinfer\_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() \<nvdsinfer\_context\_impl.cpp:1691\> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-5.1/samples/deepstream\_python\_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary\_Detector/resnet10.caffemodel\_b1\_gpu0\_int8.engine failed  
0:00:05.151465266 7812 0x15be1c40 WARN nvinfer gstnvinfer.cpp:616:gst\_nvinfer\_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() \<nvdsinfer\_context\_impl.cpp:1798\> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-5.1/samples/deepstream\_python\_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary\_Detector/resnet10.caffemodel\_b1\_gpu0\_int8.engine failed, try rebuild  
0:00:05.151503035 7812 0x15be1c40 INFO nvinfer gstnvinfer.cpp:619:gst\_nvinfer\_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() \<nvdsinfer\_context\_impl.cpp:1716\> [UID = 1]: Trying to create engine from model files  
WARNING: INT8 not supported by platform. Trying FP16 mode.  
INFO: [TRT]: Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.  
INFO: [TRT]: Detected 1 inputs and 2 output network tensors.  
0:00:40.400924195 7812 0x15be1c40 INFO nvinfer gstnvinfer.cpp:619:gst\_nvinfer\_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() \<nvdsinfer\_context\_impl.cpp:1749\> [UID = 1]: serialize cuda engine to file: /opt/nvidia/deepstream/deepstream-5.1/samples/models/Primary\_Detector/resnet10.caffemodel\_b1\_gpu0\_fp16.engine successfully  
INFO: [Implicit Engine Info]: layers num: 3  
0 INPUT kFLOAT input\_1 3x368x640  
1 OUTPUT kFLOAT conv2d\_bbox 16x23x40  
2 OUTPUT kFLOAT conv2d\_cov/Sigmoid 4x23x40

0:00:41.075795664 7812 0x15be1c40 INFO nvinfer gstnvinfer\_impl.cpp:313:notifyLoadModelStatus: [UID 1]: Load new model:dstest1\_pgie\_config.txt sucessfully  
NvMMLiteOpen : Block : BlockType = 261  
NVMEDIA: Reading vendor.tegra.display-size : status: 6  
NvMMLiteBlockCreate : Block : BlockType = 261  
Frame Number=0 Number of Objects=5 Vehicle\_count=3 Person\_count=2  
0:00:41.658635876 7812 0x15559d40 WARN nvinfer gstnvinfer.cpp:1984:gst\_nvinfer\_output\_loop: error: Internal data stream error.  
0:00:41.658685518 7812 0x15559d40 WARN nvinfer gstnvinfer.cpp:1984:gst\_nvinfer\_output\_loop: error: streaming stopped, reason error (-5)  
Error: gst-stream-error-quark: Internal data stream error. (1): /dvs/git/dirty/git-master\_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(1984): gst\_nvinfer\_output\_loop (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:  
streaming stopped, reason error (-5)

---

<div class="post-metadata">

**Author:** ![riyan.dcosta](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/riyan.dcosta/32/73629_2.png) [@riyan.dcosta](https://forums.developer.nvidia.com/u/riyan.dcosta)\
**Post date:** [March 4, 2021, 10:38am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/5 "2021-03-04T10:38:24Z")

</div>

would anyone let me know the path where the gst-python package must be present?

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [March 4, 2021, 10:55am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/6 "2021-03-04T10:55:05Z")

</div>

Nano is poor. You need to modify dstest1\_pgie\_config.txt file, change the following lines:

model-file=…/…/…/…/samples/models/Primary\_Detector/resnet10.caffemodel  
proto-file=…/…/…/…/samples/models/Primary\_Detector/resnet10.prototxt  
model-engine-file=…/…/…/…/samples/models/Primary\_Detector/resnet10.caffemodel\_b1\_gpu0\_int8.engine  
labelfile-path=…/…/…/…/samples/models/Primary\_Detector/labels.txt  
int8-calib-file=…/…/…/…/samples/models/Primary\_Detector/cal\_trt.bin

to the lines:

model-file=…/…/…/…/samples/models/Primary\_Detector\_Nano/resnet10.caffemodel  
proto-file=…/…/…/…/samples/models/Primary\_Detector\_Nano/resnet10.prototxt  
model-engine-file=…/…/…/…/samples/models/Primary\_Detector\_Nano/resnet10.caffemodel\_b1\_gpu0\_int8.engine  
labelfile-path=…/…/…/…/samples/models/Primary\_Detector\_Nano/labels.txt

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [March 4, 2021, 10:55am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/7 "2021-03-04T10:55:32Z")

</div>

Some cases may not work with Nano.

---

<div class="post-metadata">

**Author:** ![riyan.dcosta](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/riyan.dcosta/32/73629_2.png) [@riyan.dcosta](https://forums.developer.nvidia.com/u/riyan.dcosta)\
**Post date:** [March 4, 2021, 11:15am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/8 "2021-03-04T11:15:44Z")

</div>

I don’t believe its the problem of Nano being poor in performance, the C test apps will give almost 30 fps for 4 batches of video processing, while th python test apps only process 1 batch of video. I think the mistake is somewhere else, maybe when installing the gstreamer python plugin or with the py-bindings.

---

<div class="post-metadata">

**Author:** ![riyan.dcosta](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/riyan.dcosta/32/73629_2.png) [@riyan.dcosta](https://forums.developer.nvidia.com/u/riyan.dcosta)\
**Post date:** [March 4, 2021, 11:16am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/9 "2021-03-04T11:16:23Z")

</div>

It generated the same error.

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [March 4, 2021, 11:18am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/10 "2021-03-04T11:18:36Z")

</div>

Do you mean C deepstream-test1 app can work?

---

<div class="post-metadata">

**Author:** ![riyan.dcosta](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/riyan.dcosta/32/73629_2.png) [@riyan.dcosta](https://forums.developer.nvidia.com/u/riyan.dcosta)\
**Post date:** [March 4, 2021, 11:19am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/11 "2021-03-04T11:19:29Z")

</div>

yes, all the c test apps works without any issues.

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [March 4, 2021, 11:30am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/12 "2021-03-04T11:30:10Z")

</div>

[NVIDIA-AI-IOT/deepstream\_python\_apps: A project demonstrating use of Python for DeepStream sample apps given as a part of SDK (that are currently in C,C++). (github.com)](https://github.com/NVIDIA-AI-IOT/deepstream_python_apps) has been updated for deepstream 5.1, have you got the latest code?

---

<div class="post-metadata">

**Author:** ![riyan.dcosta](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/riyan.dcosta/32/73629_2.png) [@riyan.dcosta](https://forums.developer.nvidia.com/u/riyan.dcosta)\
**Post date:** [March 4, 2021, 11:36am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/13 "2021-03-04T11:36:25Z")

</div>

Yes, I have the latest code form GitHub from master branch. May I know the exact path where Gst Python v1.14.5 must be installed?

---

<div class="post-metadata">

**Author:** ![riyan.dcosta](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/riyan.dcosta/32/73629_2.png) [@riyan.dcosta](https://forums.developer.nvidia.com/u/riyan.dcosta)\
**Post date:** [March 8, 2021, 5:19am UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/14 "2021-03-08T05:19:54Z")

</div>

Got the fix, Reinstalled the OS and then just downloaded the .deb deepstream package and installed the 2 dependencies required for that .deb package and then cloned the GitHub python programs and it executed without error. By not installing other prerequisits or dependencies again fixed this issue because all the necessary ones already come with the JetPack.

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:15pm UTC](https://forums.developer.nvidia.com/t/error-running-the-deepstream-python-apps/170016/16 "2021-10-12T16:15:01Z")

</div>


