vinifmor / bauh

Graphical user interface for managing your Linux applications. Supports AppImage, Debian and Arch packages (including AUR), Flatpak, Snap and native Web applications
zlib License
976 stars 70 forks source link

data.json missing for snapd #271

Closed Templayer closed 2 years ago

Templayer commented 2 years ago

While testing things for https://github.com/vinifmor/bauh/issues/261 I've noticed errors in the terminal output while using the newest staging (at least I hope it is the newest staging, I want that script of mine that removes staging bauh and reinstalls everything to be a do-and-forget kind of deal as far as scripting goes):

[sudo] heslo pro jboksa1:           
Cloning into 'bauh'...
remote: Enumerating objects: 441, done.
remote: Counting objects: 100% (441/441), done.
remote: Compressing objects: 100% (348/348), done.
remote: Total 441 (delta 117), reused 222 (delta 84), pack-reused 0
Receiving objects: 100% (441/441), 591.06 KiB | 1.61 MiB/s, done.
Resolving deltas: 100% (117/117), done.
Collecting pip
  Downloading pip-22.1.1-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 794 kB/s 
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-22.1.1
Requirement already satisfied: setuptools in ./venv/lib/python3.8/site-packages (44.0.0)
Collecting setuptools
  Using cached setuptools-62.3.2-py3-none-any.whl (1.2 MB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 44.0.0
    Uninstalling setuptools-44.0.0:
      Successfully uninstalled setuptools-44.0.0
Successfully installed setuptools-62.3.2
Collecting wheel
  Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.37.1
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
Collecting soupsieve>1.2
  Using cached soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Installing collected packages: soupsieve, beautifulsoup4
Successfully installed beautifulsoup4-4.11.1 soupsieve-2.3.2.post1
Collecting pyqt5>=5.12
  Using cached PyQt5-5.15.6-cp36-abi3-manylinux1_x86_64.whl (8.3 MB)
Collecting requests>=2.18
  Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting colorama>=0.3.8
  Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting pyyaml>=3.13
  Using cached PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting PyQt5-sip<13,>=12.8
  Using cached PyQt5_sip-12.10.1-cp38-cp38-manylinux1_x86_64.whl (353 kB)
Collecting PyQt5-Qt5>=5.15.2
  Using cached PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.5.18.1-py3-none-any.whl (155 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Installing collected packages: PyQt5-Qt5, urllib3, six, pyyaml, PyQt5-sip, pyparsing, idna, colorama, charset-normalizer, certifi, requests, python-dateutil, pyqt5, packaging
Successfully installed PyQt5-Qt5-5.15.2 PyQt5-sip-12.10.1 certifi-2022.5.18.1 charset-normalizer-2.0.12 colorama-0.4.4 idna-3.3 packaging-21.3 pyparsing-3.0.9 pyqt5-5.15.6 python-dateutil-2.8.2 pyyaml-6.0 requests-2.27.1 six-1.16.0 urllib3-1.26.9
Processing /home/jboksa1/bauh
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pyqt5>=5.12 in ./venv/lib/python3.8/site-packages (from bauh==0.10.3) (5.15.6)
Requirement already satisfied: requests>=2.18 in ./venv/lib/python3.8/site-packages (from bauh==0.10.3) (2.27.1)
Requirement already satisfied: colorama>=0.3.8 in ./venv/lib/python3.8/site-packages (from bauh==0.10.3) (0.4.4)
Requirement already satisfied: pyyaml>=3.13 in ./venv/lib/python3.8/site-packages (from bauh==0.10.3) (6.0)
Requirement already satisfied: python-dateutil>=2.7 in ./venv/lib/python3.8/site-packages (from bauh==0.10.3) (2.8.2)
Requirement already satisfied: packaging in ./venv/lib/python3.8/site-packages (from bauh==0.10.3) (21.3)
Requirement already satisfied: PyQt5-Qt5>=5.15.2 in ./venv/lib/python3.8/site-packages (from pyqt5>=5.12->bauh==0.10.3) (5.15.2)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in ./venv/lib/python3.8/site-packages (from pyqt5>=5.12->bauh==0.10.3) (12.10.1)
Requirement already satisfied: six>=1.5 in ./venv/lib/python3.8/site-packages (from python-dateutil>=2.7->bauh==0.10.3) (1.16.0)
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.8/site-packages (from requests>=2.18->bauh==0.10.3) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in ./venv/lib/python3.8/site-packages (from requests>=2.18->bauh==0.10.3) (2.0.12)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./venv/lib/python3.8/site-packages (from requests>=2.18->bauh==0.10.3) (1.26.9)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.8/site-packages (from requests>=2.18->bauh==0.10.3) (2022.5.18.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in ./venv/lib/python3.8/site-packages (from packaging->bauh==0.10.3) (3.0.9)
Building wheels for collected packages: bauh
  Building wheel for bauh (setup.py) ... done
  Created wheel for bauh: filename=bauh-0.10.3-py3-none-any.whl size=761315 sha256=41e773977a26de3ea250f98dee401462249b872826f20900fce9f72bde812584
  Stored in directory: /tmp/pip-ephem-wheel-cache-7hpmedf7/wheels/b8/cc/db/fa4b97c5055ce598d6f44c3a1d3f0ca2ff1b9568382fa23933
Successfully built bauh
Installing collected packages: bauh
Successfully installed bauh-0.10.3
Exception in thread Thread-19:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 68, in run
    self._fill_cached_data(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 77, in _fill_cached_data
    cached_data = self.read(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 45, in read
    with open(disk_path) as f:
FileNotFoundError: [Errno 2] Adresář nebo soubor neexistuje: '/home/jboksa1/.cache/bauh/snap/installed/snapd/data.json'
Press any key to quit ...Exception in thread Thread-17:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 68, in run
    self._fill_cached_data(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 77, in _fill_cached_data
    cached_data = self.read(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 45, in read
    with open(disk_path) as f:
FileNotFoundError: [Errno 2] Adresář nebo soubor neexistuje: '/home/jboksa1/.cache/bauh/snap/installed/snap-store/data.json'
Exception in thread Thread-17:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 68, in run
    self._fill_cached_data(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 77, in _fill_cached_data
    cached_data = self.read(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 45, in read
    with open(disk_path) as f:
FileNotFoundError: [Errno 2] Adresář nebo soubor neexistuje: '/home/jboksa1/.cache/bauh/snap/installed/gtk-common-themes/data.json'
Exception in thread Thread-17:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 68, in run
    self._fill_cached_data(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 77, in _fill_cached_data
    cached_data = self.read(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 45, in read
    with open(disk_path) as f:
FileNotFoundError: [Errno 2] Adresář nebo soubor neexistuje: '/home/jboksa1/.cache/bauh/snap/installed/snap-store/data.json'
Exception in thread Thread-17:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 68, in run
    self._fill_cached_data(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 77, in _fill_cached_data
    cached_data = self.read(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 45, in read
    with open(disk_path) as f:
FileNotFoundError: [Errno 2] Adresář nebo soubor neexistuje: '/home/jboksa1/.cache/bauh/snap/installed/snap-store/data.json'
Exception in thread Thread-17:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 68, in run
    self._fill_cached_data(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 77, in _fill_cached_data
    cached_data = self.read(pkg)
  File "/home/jboksa1/bauh/venv/lib/python3.8/site-packages/bauh/view/util/disk.py", line 45, in read
    with open(disk_path) as f:
FileNotFoundError: [Errno 2] Adresář nebo soubor neexistuje: '/home/jboksa1/.cache/bauh/snap/installed/snapd/data.json'

Bauh itself can (at least) see installed snaps correctly, as the Windows version of notepad++ shows in the following printscreen:

image

(I'm using the Windows version over the Linux one due to the absence of plugins in the Linux one... the Compare plugin is pretty much something that should be in the base Notepad++ build from the get-go, I think)

vinifmor commented 2 years ago

Hi @Templayer , this error is a regression only in the staging branch. I've just fixed. Thank you for reporting it.

Templayer commented 2 years ago

I've tested this and it no longer occurs.