# CVB.py IDS camera stream

**URL:** https://forum.commonvisionblox.com/t/cvb-py-ids-camera-stream/379
**Category:** Python API
**Tags:** genicam
**Created:** [February 21, 2018, 3:18pm UTC](https://forum.commonvisionblox.com/t/cvb-py-ids-camera-stream/379 "2018-02-21T15:18:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![michaelbe](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@michaelbe](https://forum.commonvisionblox.com/u/michaelbe)
#### Post date: [February 21, 2018, 3:18pm UTC](https://forum.commonvisionblox.com/t/cvb-py-ids-camera-stream/379/1 "2018-02-21T15:18:11Z")

</div>

Hello,

I am using a IDS camera. I have installed the camera driver as well as the cvb camera driver. Everything should work fine. When I do the following task. everything works:

**import cvb**  
**import os**  
**import numpy as np**  
**import matplotlib.pyplot as plt**

**path = "%CVB%/Drivers/CVuEye.vin"**  
**path\_exp = os.path.expandvars(path)**  
**device = cvb.DeviceFactory.open(path\_exp)**  
**stream = device.stream**  
**stream.start()**

**img,status=stream.wait()**

But as soon as I do the folliwing, my Kernel dies. I have no clue what’s the problem. I already changed the format to mono 8 in the ini file.

**img\_mat=cvb.as\_array(img)**  
–\> Kernel dies in Spyder

I hope anybody can help me 🙂 Thank you

---

<div class="post-metadata">

### Author: ![Andreas](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/andreas/32/75_2.png) [@Andreas](https://forum.commonvisionblox.com/u/Andreas)
#### Post date: [February 22, 2018, 10:32am UTC](https://forum.commonvisionblox.com/t/cvb-py-ids-camera-stream/379/2 "2018-02-22T10:32:03Z")

</div>

Hi @michaelbe,

first, there is nothing wrong with your code that is the intended way to use it!

However, crashing the kernel is clearly a bug on our side! As there have been recent changes to CVBpy this might have been fixed. I just checked with my current version and it works fine.

My current version will be available as nightly setup tomorrow!  
If the error persists please contact [support@stemmer-imaging.de](mailto:support@stemmer-imaging.de) and tell us:

- OS Version and architecture
- current CVBpy version (includes also dynamic information)

```python
cvb.version()

```

- CVuEye.vin version.

Furthermore you may check with a different device type like “%CVB%\Tutorial\ClassicSwitch.emu”.

---

<div class="post-metadata">

### Author: ![michaelbe](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@michaelbe](https://forum.commonvisionblox.com/u/michaelbe)
#### Post date: [February 22, 2018, 12:12pm UTC](https://forum.commonvisionblox.com/t/cvb-py-ids-camera-stream/379/3 "2018-02-22T12:12:57Z")

</div>

Hello Andreas,

thank you very much for your quick response. I have updtated my cvb.py.  
When I do the following:

**img\_mat=cvb.as\_array(img)**

I get this error-message:

_failed to create numpy array_

I will update cvb.py tmorrow and try it again.

Thanks

---

<div class="post-metadata">

### Author: ![Andreas](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/andreas/32/75_2.png) [@Andreas](https://forum.commonvisionblox.com/u/Andreas)
#### Post date: [February 22, 2018, 12:32pm UTC](https://forum.commonvisionblox.com/t/cvb-py-ids-camera-stream/379/4 "2018-02-22T12:32:00Z")

</div>

> [@michaelbe](#):
>
> failed to create numpy array

Yes this one I fixed just today. In tomorrow’s setup it should be gone!

---

<div class="post-metadata">

### Author: ![michaelbe](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@michaelbe](https://forum.commonvisionblox.com/u/michaelbe)
#### Post date: [February 26, 2018, 2:22pm UTC](https://forum.commonvisionblox.com/t/cvb-py-ids-camera-stream/379/5 "2018-02-26T14:22:44Z")

</div>

Hello Andreas,

I just tried it again, but it still fails when doing **cvb.as\_array(img)**. I downloaded the cvb.py at the following link.

[https://forum.commonvisionblox.com/t/getting-started-with-cvbpy/241](https://forum.commonvisionblox.com/t/getting-started-with-cvbpy/241)

This may be incorrect. Could you send me a correct link for downloading cvb.py.

Tank you very much.

---

<div class="post-metadata">

### Author: ![michaelbe](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@michaelbe](https://forum.commonvisionblox.com/u/michaelbe)
#### Post date: [February 26, 2018, 2:29pm UTC](https://forum.commonvisionblox.com/t/cvb-py-ids-camera-stream/379/6 "2018-02-26T14:29:33Z")

</div>

![Kernel_Dies](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/1X/2d1132bc441ca0f99139b251908c309b9a520ead.PNG)
