Skip to content

AttributeError: 'gi.repository.Gtk' object has no attribute 'STOCK_CANCEL' #33

Description

I downloaded version 1.5.1 from https://29a.ch/playitslowly/playitslowly-1.5.1.tar.gz and installed on Ubuntu 22.04.

I installed as described in Generic Installation section of the README.

When I try to launch, I get the following error:

$ playitslowly
/home/user/playitslowly-1.5.1/playitslowly/app.py:36: 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, GObject, Gst, Gio, Gdk
/home/user/playitslowly-1.5.1/playitslowly/app.py:38: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
  GObject.threads_init()
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/user/playitslowly-1.5.1/playitslowly/app.py", line 41, in <module>
    from playitslowly.pipeline import Pipeline
  File "/home/user/playitslowly-1.5.1/playitslowly/pipeline.py", line 33, in <module>
    from playitslowly import myGtk
  File "/home/user/playitslowly-1.5.1/playitslowly/myGtk.py", line 29, in <module>
    buttons_ok_cancel = (Gtk.STOCK_CANCEL,Gtk.ResponseType.CANCEL,Gtk.STOCK_OPEN,Gtk.ResponseType.OK)
  File "/usr/lib/python3/dist-packages/gi/overrides/__init__.py", line 32, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/python3/dist-packages/gi/module.py", line 123, in __getattr__
    raise AttributeError("%r object has no attribute %r" % (
AttributeError: 'gi.repository.Gtk' object has no attribute 'STOCK_CANCEL'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions