You are not logged in.

#1 2024-03-24 04:31:27

HumungusFungus
Member
Registered: 2022-12-08
Posts: 15

[SOLVED] Unable to use applications that use GObject

I cannot run lutris nor powerprofilesctl, as they bring up this error:

Traceback (most recent call last):
  File "/usr/bin/lutris", line 58, in <module>
    from lutris.gui.application import Application  # pylint: disable=no-name-in-module
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/lutris/gui/application.py", line 35, in <module>
    from gi.repository import Gio, GLib, Gtk, GObject
  File "/usr/lib/python3.11/site-packages/gi/importer.py", line 133, in create_module
    raise ImportError('cannot import name %s, '
ImportError: cannot import name Gio, introspection typelib not found

for lutris, and

Traceback (most recent call last):
  File "/usr/bin/powerprofilesctl", line 7, in <module>
    from gi.repository import Gio, GLib
  File "/usr/lib/python3.11/site-packages/gi/importer.py", line 133, in create_module
    raise ImportError('cannot import name %s, '
ImportError: cannot import name Gio, introspection typelib not found

for powerprofilectl.

In a little python script, I tried importing different modules from gobject and all of them seem to cause the issue, so there's nothing special about Gio but instead the whole gobject library seems to be causing problems.

I did not install gobject from pip, but did it using pacman by installing the package python-gobject. This happened after a recent system update.

I'm using the latest version of python-gobject.

Last edited by HumungusFungus (2024-03-26 01:31:41)

Offline

#2 2024-03-25 23:14:32

00xrin
Member
Registered: 2024-03-25
Posts: 2

Re: [SOLVED] Unable to use applications that use GObject

Same issue after upgrade

Packages with issue (Up-down it's dependency)

# python-gobject-3.48.1-2
  # gobject-introspection-runtime-1.80.0-1
    # libgirepository-1.80.0-1

Issue disappear when downgrade. So versions that WORK:

# python-gobject-3.46.0-1-1.78.1-1
  # gobject-introspection-runtime-1.78.1-1
    # libgirepository-1.78.1-1

Last edited by 00xrin (2024-03-25 23:27:51)

Offline

#3 2024-03-25 23:20:17

00xrin
Member
Registered: 2024-03-25
Posts: 2

Re: [SOLVED] Unable to use applications that use GObject

For people who want quick & dirty solution, here is how you can downgrade to previous versions, which most likely are in cache of under `/var/cache/pacman/pkg/*`

1. Remove current versions:

sudo pacman -Rdd \
  python-gobject \
  gobject-introspection-runtime \
  libgirepository

2. Install versions from  cache

export C=/var/cache/pacman/pkg
export OLD_GOBJ_RUNTIME=$C/gobject-introspection-runtime-1.78.1-1-x86_64.pkg.tar.zst
export OLD_GOBJ=$C/python-gobject-3.46.0-1-x86_64.pkg.tar.zst
export OLD_LIBGI=$C/libgirepository-1.78.1-1-x86_64.pkg.tar.zst
sudo pacman -U $OLD_LIBGI
sudo pacman -U $OLD_GOBJ_RUNTIME
sudo pacman -U $OLD_GOBJ

* Remember if you run upgrade packages with pacman it will overwrite with new version
* If previous versions are not in pacman cache, you can install them from arch archive: https://archive.archlinux.org/

Last edited by 00xrin (2024-03-25 23:23:32)

Offline

Board footer

Powered by FluxBB