<< return to Pixycam.com

Issues running GetBlockDemo python script

We am currently working on a school project and we are trying to get the GetBlockDemo python script to work on our Raspberry Pi 3B+. When we run the code we are getting an ImportError: /home/pi/pixy2/build/python_demos/_pixy.so: undefined symbol: PyInstance_type.

We did not modify the python script. We have already pulled the library from github several times.

Is there any way we can correct this import error?

Hello,
Are you running Python3? Currently, the library only supports Python2. You can find out by running “python” and looking at the version that gets printed.

Edward

We tried running it with python3, python, python2.7 and we also included sudo but there is still an error occurring. We are trying stop the GetBlockDemo from running given a certain time. Is there any way we can fix this error so we can adjust the python script?

Hello, I’m not sure what might be going on. Let’s try this – have you been able to get the libpixyusb2 get_blocks_cpp_demo demo working? There are step-by-step instructions here:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_the_libpixyusb_example_on_linux

Edward