Skip to content

gi issue on RaspPi #43

Open
Open
@andbrocode

Description

@andbrocode

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

Activity

self-assigned this
on May 28, 2024
TIS-Edgar

TIS-Edgar commented on May 28, 2024

@TIS-Edgar
Member

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

All somewhat modern python wrapper for gi should implement require_version.

  • What OS are you using? lsb_release -a
  • What version of gi are you using? python3 -c "import gi; print(gi.__version__)"
  • Which tiscamera version are you using and how did you install ist (compiled yourself or precompiled packages)
  • 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.
andbrocode

andbrocode commented on Jun 3, 2024

@andbrocode
Author

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

TIS-Edgar commented on Jun 3, 2024

@TIS-Edgar
Member

Did you install the python gobject-introspection wrapper?

sudo apt install python3-gi

andbrocode

andbrocode commented on Jun 5, 2024

@andbrocode
Author

Yes I did.

TIS-Stefan

TIS-Stefan commented on Jun 6, 2024

@TIS-Stefan
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    gi issue on RaspPi · Issue #43 · TheImagingSource/Linux-tiscamera-Programming-Samples