Skip to content

Snap-Pakete werden nicht angezeigt, auch im Typ nicht verfügbar #404

@hzahn2026

Description

@hzahn2026

Problem: Installierte snap-Pakete werden nicht angezeigt, auch beim Typ nicht auswählbar!

bauh-Version: 0.10.8
O.S.: Ubuntu 24.04.3 LTS
python3 --version
Python 3.13.5
Installation method: pip

Fehler:
hzahn@hzahn-vn7:~/bauh$ venv/bin/bauh # or venv/bin/bauh-tray
Exception in thread Thread-22 (_fill_read_installed):
Traceback (most recent call last):
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/connection.py", line 204, in _new_conn
sock = connection.create_connection(
(self._dns_host, self.port),
...<2 lines>...
socket_options=self.socket_options,
)
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/linuxbrew/.linuxbrew/opt/python@3.13/lib/python3.13/socket.py", line 977, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Temporärer Fehler bei der Namensauflösung

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/connectionpool.py", line 787, in urlopen
response = self._make_request(
conn,
...<10 lines>...
**response_kw,
)
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/connectionpool.py", line 493, in _make_request
conn.request(
~~~~~~~~~~~~^
method,
^^^^^^^
...<6 lines>...
enforce_content_length=enforce_content_length,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/connection.py", line 500, in request
self.endheaders()
~~~~~~~~~~~~~~~^^
File "/home/linuxbrew/.linuxbrew/opt/python@3.13/lib/python3.13/http/client.py", line 1333, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/linuxbrew/.linuxbrew/opt/python@3.13/lib/python3.13/http/client.py", line 1093, in _send_output
self.send(msg)
~~~~~~~~~^^^^^
File "/home/linuxbrew/.linuxbrew/opt/python@3.13/lib/python3.13/http/client.py", line 1037, in send
self.connect()
~~~~~~~~~~~~^^
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/connection.py", line 331, in connect
self.sock = self._new_conn()
~~~~~~~~~~~~~~^^
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/connection.py", line 211, in _new_conn
raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: HTTPConnection(host='snapd', port=80): Failed to resolve 'snapd' ([Errno -3] Temporärer Fehler bei der Namensauflösung)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/requests/adapters.py", line 644, in send
resp = conn.urlopen(
method=request.method,
...<9 lines>...
chunked=chunked,
)
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/connectionpool.py", line 841, in urlopen
retries = retries.increment(
method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
)
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/urllib3/util/retry.py", line 535, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='snapd', port=80): Max retries exceeded with url: /v2/apps (Caused by NameResolutionError("HTTPConnection(host='snapd', port=80): Failed to resolve 'snapd' ([Errno -3] Temporärer Fehler bei der Namensauflösung)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/linuxbrew/.linuxbrew/opt/python@3.13/lib/python3.13/threading.py", line 1043, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/home/linuxbrew/.linuxbrew/opt/python@3.13/lib/python3.13/threading.py", line 994, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/bauh/view/core/controller.py", line 206, in _fill_read_installed
man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=internet_available,
limit=-1, only_apps=False)
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/bauh/gems/snap/controller.py", line 94, in read_installed
app_names = {a['snap'] for a in snapd_client.list_only_apps()}
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/bauh/gems/snap/snapd.py", line 90, in list_only_apps
res = self.session.get(f'{URL_BASE}/apps')
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/home/hzahn/bauh/venv/lib/python3.13/site-packages/requests/adapters.py", line 677, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='snapd', port=80): Max retries exceeded with url: /v2/apps (Caused by NameResolutionError("HTTPConnection(host='snapd', port=80): Failed to resolve 'snapd' ([Errno -3] Temporärer Fehler bei der Namensauflösung)"))

Before opening a new issue
Install the staging branch and check if the unexpected behavior is happening there as well.
If you are on ArchLinux-based distro, you can install it through AUR (bauh-staging). Otherwise, you have
to clone the repository and install it with pip:

git clone https://github.com/vinifmor/bauh.git -b staging --depth=1
cd bauh
python3 -m venv venv
venv/bin/pip install pip --upgrade
venv/bin/pip install setuptools --upgrade
venv/bin/pip install -r requirements.txt
venv/bin/pip install .
venv/bin/bauh  # or venv/bin/bauh-tray

Describe the bug
A clear and concise description of what the bug is.

Software Environment
bauh version:
O.S: name and version
Python version:
Installation method: pip | distro package manager (e.g: pacman)

P.S: these instructions and the template must be respected, otherwise your issue will be closed.

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