Closed user234683 closed 1 year ago
It seems to be because of this line:
Gtk.License.GPL_2_0
I can reproduce it in a terminal:
$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>>
>>> gi.require_version("Gdk", "3.0")
>>> gi.require_version("GdkX11", "3.0")
>>> gi.require_version("Gio", "2.0")
>>> gi.require_version("GLib", "2.0")
>>> gi.require_version("GObject", "2.0")
>>> gi.require_version("Gtk", "3.0")
>>> # pylint: disable=wrong-import-position
>>> from gi.repository import Gtk
>>> from gi.repository import Gdk, Gio, Gtk
>>> from gi.repository import Gtk
>>> Gtk.License.GPL_2_0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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 155, in __getattr__
setattr(wrapper, value_name, wrapper(value_info.get_value()))
ValueError: invalid enum value: 15
>>> Gtk.License.GPL_2_0
<enum GTK_LICENSE_GPL_2_0 of type Gtk.License>
It works the second time the attribute is accessed. I think that library is overengineering that attribute and is best avoided, so maybe replace with a string like this?
LICENSE = "GPLv2"
Doing that and rebuilding the egg file fixed that error, but I have a new error in the next issue.
Also would it be possible to make /usr/local/lib/python3.9/dist-packages/volctl-0.9.2-py3.9.egg
a directory like the other packages are instead of a zip file? It makes it more difficult to debug these issues and make modifications
Installation:
Error:
System: Debian GNU/Linux 11 (bullseye), upgraded from Debian 10 Python 3.9.2 (system installation)