# Jetbot Object Detection Model Issue - Cannot load

**URL:** <https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193>\
**Category:** Jetson Nano\
**Created:** [March 9, 2020, 7:44pm UTC](https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193 "2020-03-09T19:44:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jucohen](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jucohen](https://forums.developer.nvidia.com/u/jucohen)\
**Post date:** [March 9, 2020, 7:44pm UTC](https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193/1 "2020-03-09T19:44:50Z")

</div>

Good day, I am trying to troubleshoot a JetBot issue, this is a Waveshare jetbot kit, installed using the latest Nvidia Image and then WaveShare’s installer.

When I attempt to run the object detection script

```auto
from jetbot import ObjectDetector
model = ObjectDetector('ssd_mobilenet_v2_coco.engine')

```

I get the following output.

```auto
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-78c468b59bd4> in <module>
      1 from jetbot import ObjectDetector
      2 
----> 3 model = ObjectDetector('ssd_mobilenet_v2_coco.engine')

/usr/local/lib/python3.6/dist-packages/jetbot-0.3.0-py3.6.egg/jetbot/object_detection.py in __init__ (self, engine_path, preprocess_fn)
     26 load_plugins()
     27 self.trt_model = TRTModel(engine_path, input_names=[TRT_INPUT_NAME],
---> 28 output_names=[TRT_OUTPUT_NAME, TRT_OUTPUT_NAME + '_1'])
     29 self.preprocess_fn = preprocess_fn
     30 

/usr/local/lib/python3.6/dist-packages/jetbot-0.3.0-py3.6.egg/jetbot/tensorrt_model.py in __init__ (self, engine_path, input_names, output_names, final_shapes)
     57 with open(engine_path, 'rb') as f:
     58 self.engine = self.runtime.deserialize_cuda_engine(f.read())
---> 59 self.context = self.engine.create_execution_context()
     60 
     61 if input_names is None:

AttributeError: 'NoneType' object has no attribute 'create_execution_context'

```

Some have suggested this is due to TensorRT version. The version in this jetpack is 6.0 - some say I need 5. I have tried re-compiling TRT and a few other things to no avail.

Any advice appreciated, thanks.

---

<div class="post-metadata">

**Author:** ![infox22oo](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@infox22oo](https://forums.developer.nvidia.com/u/infox22oo)\
**Post date:** [March 10, 2020, 2:37am UTC](https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193/2 "2020-03-10T02:37:00Z")

</div>

I have the same issue with a Jetbot built directly from the wiki. Everything updated, latest version.

---

<div class="post-metadata">

**Author:** ![jucohen](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jucohen](https://forums.developer.nvidia.com/u/jucohen)\
**Post date:** [March 11, 2020, 1:04pm UTC](https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193/3 "2020-03-11T13:04:34Z")

</div>

The examples all show TensorRT 5, but a PIP3 list whows TensorRT 6, so I am thinking that running this latest JetPack is part of the problem. I may try downgrading it, I may also have to take the WaveShare bits apart to and ensure they are not updating it.

---

<div class="post-metadata">

**Author:** ![jucohen](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jucohen](https://forums.developer.nvidia.com/u/jucohen)\
**Post date:** [March 11, 2020, 3:22pm UTC](https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193/4 "2020-03-11T15:22:03Z")

</div>

I was able to get it working. Thanks to this thread… [SparkFun sd-card not compatible with object\_follow&nbsp;-&nbsp;SparkFun Electronics](https://forum.sparkfun.com/viewtopic.php?f=88&t=51549&p=213052#p213052)

The JetBot Version 4 SD Card Image ships with TensorRT 6, which, for a reason I cannot figure out simply doesn’t want to work. By downgrading th SD Card Image to JetBot Version 3, and then applying my kit makers specific modification (In my case WaveShare) I was able to get it working.

---

<div class="post-metadata">

**Author:** ![infox22oo](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@infox22oo](https://forums.developer.nvidia.com/u/infox22oo)\
**Post date:** [March 12, 2020, 9:18pm UTC](https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193/5 "2020-03-12T21:18:06Z")

</div>

Hi jucohen, Thanks for the details you provided. In addition to what you did, it’s worth retrying with a new Jetbot V 0.4 SD image and trying the example again before updating anything. In my case, I got past the model load issue. The object following doesn’t work too well but that may be a separate issue, perhaps due to the model having been trained with the different camera than the LI IMX219 that I have.

---

<div class="post-metadata">

**Author:** ![naisy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/naisy/32/11213_2.png) [@naisy](https://forums.developer.nvidia.com/u/naisy)\
**Post date:** [April 3, 2020, 2:51am UTC](https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193/6 "2020-04-03T02:51:11Z")

</div>

The latest ssd\_mobilenet\_v2\_coco.engine is here.  
[https://github.com/NVIDIA-AI-IOT/jetbot/wiki/examples](https://github.com/NVIDIA-AI-IOT/jetbot/wiki/examples)

> v0.4 (latest) ssd\_mobilenet\_v2\_coco.engine

[https://drive.google.com/file/d/1KjlDMRD8uhgQmQK-nC2CZGHFTbq4qQQH/view](https://drive.google.com/file/d/1KjlDMRD8uhgQmQK-nC2CZGHFTbq4qQQH/view)

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 14, 2021, 10:01pm UTC](https://forums.developer.nvidia.com/t/jetbot-object-detection-model-issue-cannot-load/115193/7 "2021-10-14T22:01:59Z")

</div>

Closed on October 14, 2021, 10:01pm UTC


