tldr-pages / tldr-python-client

Python command-line client for tldr pages
https://pypi.org/project/tldr/
MIT License
592 stars 92 forks source link

SteamDeck importlib error #241

Open HeWhoThreadsLightly opened 5 months ago

HeWhoThreadsLightly commented 5 months ago

On steam deck a freshly installed tldr via pacman failed to start with an exception:

(deck@steamdeck steamuser)$ tldr --version
Traceback (most recent call last):
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 563, 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/tldr", line 33, in <module>
    sys.exit(load_entry_point('tldr==3.1.0', 'console_scripts', 'tldr')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/tldr", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for tldr

Some instalation and enviroment information:

(deck@steamdeck steamuser)$ pacman -Qv tldr
Root      : /
Conf File : /etc/pacman.conf
DB Path   : /usr/lib/holo/pacmandb/
Cache Dirs: /var/cache/pacman/pkg/  
Hook Dirs : /usr/share/libalpm/hooks/  /etc/pacman.d/hooks/  
Lock File : /usr/lib/holo/pacmandb/db.lck
Log File  : /var/log/pacman.log
GPG Dir   : /etc/pacman.d/gnupg/
Targets   : tldr
tldr 3.1.0-2
(deck@steamdeck steamuser)$ pacman -Qoq /usr/lib/python3.10
cython
meson
ninja
python-appdirs
python-autocommand
python-colorama
python-inflect
python-jaraco.context
python-jaraco.functools
python-jaraco.text
python-more-itertools
python-ordered-set
python-packaging
python-pydantic
python-pyparsing
python-setuptools
python-shtab
python-termcolor
python-tomli
python-trove-classifiers
python-validate-pyproject
tldr

man also had some problemes due to a missing man-db(not installed by default) and was fixed by running pacman -S man-pages

(deck@steamdeck steamuser)$ man tldr | head
TLDR(1)                              tldr                              TLDR(1)

NAME
       tldr - tldr 3.1.0

       Python command line client for tldr

          usage: tldr command [options]

Complete list of user installed packages:

lolcat
tldr
nmap
rclone
gcc
rust
man-pages