TheImagingSource / Linux-tiscamera-Programming-Samples

Programming samples in Python and C++ for the tiscamera GStreamer modules.
71 stars 35 forks source link

gi issue on RaspPi #43

Open andbrocode opened 1 month ago

andbrocode commented 1 month ago

Hi,

I tried to get an ImagingSource camera working with a raspberry pi 4. When I try to run your script it throughs me an error for gi:

AttributeError: module 'gi' has no attribute 'require_version'

I tried several things I found online, but it keeps causing problems. Any ideas how to use TIS without gi ?

Cheers, Andreas

TIS-Edgar commented 1 month ago

Hi, tiscamera implies the usage of gstreamer and gi (gobject-introspection).

All somewhat modern python wrapper for gi should implement require_version.

andbrocode commented 1 month ago

Hi,

What OS are you using? lsb_release -a pi@raspi-romy-ids05:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm

What version of gi are you using? pi@raspi-romy-ids05:~ $ python3 -c "import gi; print(gi.version)" Traceback (most recent call last): File "", line 1, in AttributeError: module 'gi' has no attribute 'version'

Its gi 2.28.1

Which tiscamera version are you using and how did you install ist (compiled yourself or precompiled packages) I used: tiscamera-tcamprop_0.1.0.14_armhf_pi4.deb and followed the instructions

Do the python examples of tiscamera work? This is just to ensure there is no mistake in the script you are using and it really is an environment issue What scripts exactly?

pi@raspi-romy-ids05:~/tiscamera/examples/python $ python3 00-list-devices.py Traceback (most recent call last): File "/home/pi/tiscamera/examples/python/00-list-devices.py", line 24, in gi.require_version("Gst", "1.0") ^^^^^^^^^^^^^^^^^^ AttributeError: module 'gi' has no attribute 'require_version'

Cheers, Andreas

TIS-Edgar commented 1 month ago

Did you install the python gobject-introspection wrapper?

sudo apt install python3-gi

andbrocode commented 1 month ago

Yes I did.

TIS-Stefan commented 1 month ago

Hello

I searched for your error message in the internet and found: https://bbs.archlinux.org/viewtopic.php?id=203480 Maybe this is helpful for you.

Stefan