Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gi issue on RaspPi #43

Open
andbrocode opened this issue May 22, 2024 · 5 comments
Open

gi issue on RaspPi #43

andbrocode opened this issue May 22, 2024 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@andbrocode
Copy link

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 TIS-Edgar added the question Further information is requested label May 28, 2024
@TIS-Edgar TIS-Edgar self-assigned this May 28, 2024
@TIS-Edgar
Copy link
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
Copy link
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
Copy link
Member

Did you install the python gobject-introspection wrapper?

sudo apt install python3-gi

@andbrocode
Copy link
Author

Yes I did.

@TIS-Stefan
Copy link
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
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants