# Sample code execution crashes on error

**URL:** <https://community.stereolabs.com/t/sample-code-execution-crashes-on-error/9524>\
**Category:** Python\
**Tags:** jetson\
**Created:** [July 26, 2025, 7:19am UTC](https://community.stereolabs.com/t/sample-code-execution-crashes-on-error/9524 "2025-07-26T07:19:41Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![LuckyJ](https://community.stereolabs.com/user_avatar/community.stereolabs.com/luckyj/32/4631_2.png) [@LuckyJ](https://community.stereolabs.com/u/LuckyJ)\
**Post date:** [August 18, 2025, 10:06am UTC](https://community.stereolabs.com/t/sample-code-execution-crashes-on-error/9524/11 "2025-08-18T10:06:05Z")

</div>

Hello @izidorg,

Thank you for getting back to us!

I understand now the remaining visualization issue that you are describing:

- the `pytorch_yolov8_seg` displays:
  - the _tracking ID_
  - the _name_ of the detected object (unknown since it’s a custom model and the ZED SDK has no knowledge about what it represents)
  - the _distance_

- while the `pytorch_yolov8` displays:
  - the _class idx_ (an integer)
  - the _distance_

We’ll uniform that in the next release, by having as before the class idx + the distance and still add the track id when the tracking is enabled.

In the meantime, **If you want to replace the `UNKNOWN` with class idx in the `pytorch_yolov8_seg` sample** , you can replace `str(obj.label)` with `f"class {obj.raw_label}"` in [pytorch\_yolov8\_seg/cv\_viewer/tracking\_viewer.py#L127](https://github.com/stereolabs/zed-sdk/blob/master/object%20detection/custom%20detector/python/pytorch_yolov8_seg/cv_viewer/tracking_viewer.py#L127).

---

_[View the full topic](https://community.stereolabs.com/t/sample-code-execution-crashes-on-error/9524)._
