# Get\_python\_api.py errors

**URL:** <https://community.stereolabs.com/t/get-python-api-py-errors/3883>\
**Category:** Python\
**Tags:** linux, python\
**Created:** [November 6, 2023, 7:19am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883 "2023-11-06T07:19:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 6, 2023, 7:19am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/1 "2023-11-06T07:19:45Z")

</div>

Hello. I’m trying to run Zed examples on Linux. This is the output I get when I run get\_python\_api.py

 ![getpy1](https://community.stereolabs.com/uploads/default/original/2X/1/1cdb91f8daa23b878e14fc4232c7955ab168c352.png)

I’m not sure what is the red error is for. This is the result I get when I want to run an example

 ![getpy2](https://community.stereolabs.com/uploads/default/original/2X/2/2a2e95b2e5f3b50c9d284980340d61b22e0e1b4f.png)

cuda 11.4  
zed sdk 4 0  
python 3.8

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 6, 2023, 7:49am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/2 "2023-11-06T07:49:43Z")

</div>

The red error was fixed by installing onnx with pip. But as seen in the second image, it still gives me the same error when trying to run a project.

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [November 6, 2023, 10:43am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/3 "2023-11-06T10:43:14Z")

</div>

Hi, this is a mismatch between python api and SDK version. Sorry for that. This happens because the API changed between patches on 4.0, during the early access. Please install the latest SDK version (4.0.7) and the latest API, that will solve your issue.

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 6, 2023, 10:49am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/4 "2023-11-06T10:49:04Z")

</div>

Thank you alassagne, I will try and let you know.

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 8:12am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/5 "2023-11-07T08:12:37Z")

</div>

Hi alassagne,  
I installed 4.07 that seems like solved the problem but when i tried to run body tracking sample on github

> <https://github.com/stereolabs/zed-sdk/tree/master/body%20tracking/body%20tracking/python>
>
> //github.com/stereolabs/zed-sdk/tree/master/body%20tracking/body%20tracking/python

I got this error

 ![error3](https://community.stereolabs.com/uploads/default/original/2X/6/6cb88b0876b72d23b7f2673586281d92e3b7e716.png)

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [November 7, 2023, 8:27am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/6 "2023-11-07T08:27:39Z")

</div>

Hi,

It seems you are struggling to open an OpenGL context. Do you have a display connected to the machine ? This particular sample will not work remotely.  
I assume you are using a jetson and a ZED X ? What happens when you run tutorials ?

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 8:37am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/7 "2023-11-07T08:37:44Z")

</div>

Yes we have monitor connected to our zedbox. and zedx camera. This is the result when i tried to run tutorials

 ![error4](https://community.stereolabs.com/uploads/default/original/2X/2/297510d46705d670a217bd8193bf57b3dc3ff3b6.png)

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [November 7, 2023, 10:46am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/8 "2023-11-07T10:46:20Z")

</div>

Hi,

It seems our python tutorial has an issue. Probably this comes from the latest cython version, int and bool cannot be mixed anymore.  
To solve it, in the tutorial you can replace True with 1 (line 35)

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 10:49am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/9 "2023-11-07T10:49:21Z")

</div>

I can upgrade the python version if that can solve the problems

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [November 7, 2023, 11:14am UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/10 "2023-11-07T11:14:11Z")

</div>

It’s not the issue. The issue is on our side. you can just replace the line I said,  
`init_params.sdk_verbose = True`  
becomes  
`init_params.sdk_verbose = 1`

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 12:09pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/11 "2023-11-07T12:09:17Z")

</div>

Tried this too but another error came up

 ![error5](https://community.stereolabs.com/uploads/default/original/2X/9/9634e4a12280c466eabcf82b553e242ff14fdd25.png)

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [November 7, 2023, 12:50pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/12 "2023-11-07T12:50:04Z")

</div>

This happens because this tutorial was originally intended for ZED 2i and the resolution is incompatible.  
Can you try to replace the line  
`init_params.camera_resolution = sl.RESOLUTION.HD1080`  
with  
`init_params.camera_resolution = sl.RESOLUTION.AUTO`

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 12:57pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/13 "2023-11-07T12:57:57Z")

</div>

This worked for tutorial but still i cant open other projects like body tracking python project on github

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 1:44pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/14 "2023-11-07T13:44:27Z")

</div>

I think the problem here about the FBConfig with necessary capabilities not found in function fgOpenWindow part. I tried [https://support.stereolabs.com/hc/en-us/articles/8422008229143](https://support.stereolabs.com/hc/en-us/articles/8422008229143) this article but I already get OpenGL vendor string: NVIDIA Corporation.

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [November 7, 2023, 1:57pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/15 "2023-11-07T13:57:01Z")

</div>

This article is relevant if you use a laptop.  
For you, I’d advise to run

```auto
sudo apt install --reinstall nvidia-jetpack

```

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 2:06pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/16 "2023-11-07T14:06:49Z")

</div>

I tried this too but didnt worked for me.

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [November 7, 2023, 5:17pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/17 "2023-11-07T17:17:52Z")

</div>

What did it output ?

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 5:23pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/18 "2023-11-07T17:23:20Z")

</div>

installed without an error but still projects giving me FBConfig with necessary capabilities not found in function fgOpenWindow

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [November 7, 2023, 5:41pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/19 "2023-11-07T17:41:18Z")

</div>

I’m afraid you might find easier to reinstall your system. What kind of box do you have ?

---

<div class="post-metadata">

**Author:** ![emrekocdemir](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emrekocdemir](https://community.stereolabs.com/u/emrekocdemir)\
**Post date:** [November 7, 2023, 5:54pm UTC](https://community.stereolabs.com/t/get-python-api-py-errors/3883/20 "2023-11-07T17:54:08Z")

</div>

I’m using zedbox. Can i find the solution with reinstalling opengl ?

[Next page](https://community.stereolabs.com/t/get-python-api-py-errors/3883.md?page=2)
