buzz / volctl

Per-application volume control and OSD for Linux desktops.
https://buzz.github.io/volctl/
GNU General Public License v2.0
132 stars 19 forks source link

Exception Handling error upon opening the applet #84

Closed giackperetti closed 6 months ago

giackperetti commented 6 months ago

Problem

When I try to launch volctl from the CLI as i usually do i get an error related to Exception Handling.

Current Setup

OS: Arch Linux AUR Package: volctl 0.9.4-1 Audio Server: PulseAudio

Error Message

~ ❯❯❯ volctl   
Traceback (most recent call last):
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 397, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/volctl", line 33, in <module>
    sys.exit(load_entry_point('volctl==0.9.4', 'gui_scripts', 'volctl')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/volctl", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 862, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 399, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for volctl
buzz commented 6 months ago
importlib.metadata.PackageNotFoundError: No package metadata was found for volctl

The exception tells you what the issue is: The volctl package was not found on your system.

How did you install volctl? Using AUR? There seems to be an issue with your Python setup.

With a regular install volctl should be at /usr/lib/python3.11/site-packages/volctl. Maybe you're trying to start volctl within some isolated Python environment or something?

Narrat commented 6 months ago

Arch switched to python 3.12. Did you rebuild the volctl package @giack-dev ? Looks like python 3.12 at work on a python3.11 module

giackperetti commented 6 months ago

I didn't think about that. I rebuilt the volctl package and it resulted in another error that i solved by rebuilding the python-pulsectl package(a dependency for the volctl package).

Thanks for the help! :)

Narrat commented 6 months ago

You're welcome. Easy to forget when there is big python update :D Had my fair share with that in the past :D I hope they will include a hook like for the perl package which warns about modules in the wrong place. For the time being one needs to take a look at /usr/lib/python3.11/site-packages to see what needs a rebuild.