nwg-piotr / nwg-shell

Installer & meta-package for the nwg-shell project: a GTK3-based shell for sway and Hyprland Wayland compositors
Other
857 stars 14 forks source link

No package metadata was found #335

Closed blauch closed 5 months ago

blauch commented 5 months ago

Certain components of my nwg-shell setup are not launching like nwg-shell-config. I had the same with nwg-displays and could resolve it by reinstalling the package. nwg-displays and nwg-shell-config threw the exception when being launched importlib.metadata.PackageNotFoundError: No package metadata was found for ...

I think this started after upgrades but I cannot say for sure since the system is pretty stable otherwise.

Is this a general problem or specific to my installation?

$ uname -r 
6.8.9-3-MANJARO
$ lsb_release -crd
Description:    Manjaro Linux
Release:    24.0.0
Codename:   Wynsdey
$ nwg-shell -v       
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/nwg-shell", line 33, in <module>
    sys.exit(load_entry_point('nwg-shell==0.5.34', 'gui_scripts', 'nwg-shell')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/nwg-shell", 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 nwg-shell
nwg-piotr commented 5 months ago

Make sure if you don't have multiple dirs for nwg-* packages in /lib/python3.12/site-packages/. Remove and re-install if necessary.

blauch commented 5 months ago

okay... many thanks for the reply. Simply reinstalling it yay -S nwg-shell solved the issue

$ nwg-shell -v 
nwg-shell version 0.5.34
Commands:
  nwg-shell-installer            installs selected default configs interactively
  nwg-shell-installer -a [-hypr] installs All configs from scratch; [-hypr] includes Hyprland configs
  nwg-shell-installer -w [-hypr] installs configs from scratch w/ no dialogs; [-hypr] includes Hyprland configs
  nwg-shell-installer -r [-hypr] Restores missing configs, styles & data files; [-hypr] includes Hyprland configs
  nwg-shell-check-updates        system command to check updates; no point in using manually

Wiki: https://github.com/nwg-piotr/nwg-shell/wiki

keep up the great work! many thanks :bow: