Public bug reported:
The error when running from terminal is:
~$ indicator-cpufreq
/usr/lib/python3/dist-packages/indicator_cpufreq/indicator.py:22: PyGIWarning:
Gtk was imported without specifying a version first. Use
gi.require_version('Gtk', '4.0') before import to ensure that the right version
gets loaded.
from gi.repository import Gtk
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/importer.py", line 142, in load_module
introspection_module = get_introspection_module(namespace)
File "/usr/lib/python3/dist-packages/gi/module.py", line 257, in
get_introspection_module
module = IntrospectionModule(namespace, version)
File "/usr/lib/python3/dist-packages/gi/module.py", line 109, in __init__
repository.require(namespace, version)
gi.RepositoryError: Requiring namespace 'Gtk' version '3.0', but '4.0' is
already loaded
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/indicator-cpufreq", line 77, in <module>
from indicator_cpufreq.indicator import MyIndicator
File "/usr/lib/python3/dist-packages/indicator_cpufreq/indicator.py", line
23, in <module>
from gi.repository import AppIndicator3 as appindicator
File "/usr/lib/python3/dist-packages/gi/importer.py", line 144, in load_module
raise ImportError(e)
ImportError: Requiring namespace 'Gtk' version '3.0', but '4.0' is already
loaded
I do have a solution though, which is by adding to the imports in
'/usr/lib/python3/dist-packages/indicator_cpufreq/indicator.py' the
following:
import gi <<< this line
gi.require_version("Gtk", "3.0") <<< and this line
from gi.repository import GLib
from gi.repository import Gtk
from gi.repository import AppIndicator3 as appindicator
<snip>
The indicator-cpufreq app will launch successfully.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: indicator-cpufreq 0.2.2-0ubuntu3 [modified:
usr/lib/python3/dist-packages/indicator_cpufreq/indicator.py]
ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
Uname: Linux 5.15.0-25-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Thu Apr 21 16:38:54 2022
InstallationDate: Installed on 2021-10-11 (191 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
PackageArchitecture: all
SourcePackage: indicator-cpufreq
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: indicator-cpufreq (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug jammy
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1969850
Title:
indicator-cpufreq crashes when logging into desktop
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-cpufreq/+bug/1969850/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs