tokyob0t/PotatoWidgets

Widgets dont start

daUnknownCoder opened this issue · 3 comments

python ~/.config/potato/Hyprland/

(Hyprland:336165): VTE-WARNING **: 22:54:20.297: (../vte/src/vtepty.cc:667):bool _vte_pty_spawn_sync(VtePty*, const char*, const char* const*, const char* const*, GSpawnFlags, GSpawnChildSetupFunc, gpointer, GDestroyNotify, GPid*, int, GCancellable*, GError**): runtime check failed: ((spawn_flags & ignored_spawn_flags()) == 0)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/daUnknownCoder/.config/potato/Hyprland/__main__.py", line 6, in <module>
    from modules import *
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/__init__.py", line 1, in <module>
    from .windows import *
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/__init__.py", line 3, in <module>
    from .newspanel import NewsPanel
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/newspanel.py", line 6, in <module>
    from .newspanelstuff import TermWidget, ThisPCInfo, WeatherWidget
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/newspanelstuff/__init__.py", line 4, in <module>
    from .thispc_widget import *
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/newspanelstuff/thispc_widget.py", line 68, in <module>
    ThisPCInfo = Variable(get_system_info())
                          ^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/newspanelstuff/thispc_widget.py", line 63, in get_system_info
    "gpu": get_gpu(),
           ^^^^^^^^^
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/newspanelstuff/thispc_widget.py", line 20, in get_gpu
    GPU_INFO = next(i.split() for i in GPU_INFO if "Model:" in i)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
.
└── Hyprland
    ├── __init__.py
    ├── __main__.py
    ├── modules
    │   ├── __init__.py
    │   ├── __pycache__
    │   │   └── __init__.cpython-311.pyc
    │   ├── utils
    │   │   ├── apps.py
    │   │   ├── _common.py
    │   │   ├── config.py
    │   │   ├── github.py
    │   │   ├── hypr.py
    │   │   ├── media_widget.py
    │   │   ├── network_manager.py
    │   │   ├── __pycache__
    │   │   │   ├── apps.cpython-311.pyc
    │   │   │   ├── config.cpython-311.pyc
    │   │   │   ├── github.cpython-311.pyc
    │   │   │   ├── hypr.cpython-311.pyc
    │   │   │   ├── network_manager.cpython-311.pyc
    │   │   │   └── stats.cpython-311.pyc
    │   │   ├── stats.py
    │   │   └── weather.py
    │   └── windows
    │       ├── bottombar.py
    │       ├── __init__.py
    │       ├── newspanel.py
    │       ├── newspanelstuff
    │       │   ├── githubstats_widget.py
    │       │   ├── __init__.py
    │       │   ├── pcstats_widget.py
    │       │   ├── __pycache__
    │       │   │   ├── githubstats_widget.cpython-311.pyc
    │       │   │   ├── __init__.cpython-311.pyc
    │       │   │   ├── term_widget.cpython-311.pyc
    │       │   │   └── thispc_widget.cpython-311.pyc
    │       │   ├── term_widget.py
    │       │   ├── thispc_widget.py
    │       │   ├── waifu_widget.py
    │       │   └── weather_widget.py
    │       ├── notification.py
    │       ├── osd.py
    │       ├── overview.py
    │       ├── overviewstuff
    │       │   └── __init__.py
    │       ├── __pycache__
    │       │   ├── bottombar.cpython-311.pyc
    │       │   ├── __init__.cpython-311.pyc
    │       │   ├── newspanel.cpython-311.pyc
    │       │   └── notification.cpython-311.pyc
    │       ├── quicksettings.py
    │       ├── shutdown.py
    │       ├── startmenu.py
    │       ├── togglewindows.py
    │       ├── wallpaper.py
    │       └── wallpaperstuff
    │           └── __init__.py
    ├── __pycache__
    │   └── __main__.cpython-311.pyc
    ├── scss
    │   ├── bottombar.scss
    │   ├── images
    │   │   ├── icons
    │   │   │   ├── open.svg
    │   │   │   ├── win-news.png
    │   │   │   ├── win-start.png
    │   │   │   └── win-task.png
    │   │   ├── pfp2.png
    │   │   ├── pfp.png
    │   │   └── win11wallpaper.png
    │   ├── newspanel.scss
    │   ├── notifications.scss
    │   ├── osd.scss
    │   ├── overview.scss
    │   ├── quicksettings.scss
    │   ├── shutdown.scss
    │   ├── startmenu.scss
    │   └── wallpaper.scss
    └── style.scss

16 directories, 65 files

Helo, please open this issue on its respective page; it's more related to my dotfiles than the general widget system;

Replace the existing code snippet:

GPU_INFO = next(i.split() for i in GPU_INFO if "Model:" in i)

with the following code:

GPU_INFO = next(
    (i.split() for i in GPU_INFO if "Model:" in i),
    ["Model", "not", "found"],
)

ok so i created a venv, for ~/.config/potato/ with python, potatowidgets, dbus, but it gives me this:
also init.sh has been run
python ~/.config/potato/Hyprland:

** (Hyprland:280188): WARNING **: 17:00:47.272: Failed to load shared library 'libgtk-3.so.0' referenced by the typelib: /home/daUnknownCoder/miniconda3/envs/potato/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libicuuc.so.74)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/daUnknownCoder/.config/potato/Hyprland/__main__.py", line 4, in <module>
    from PotatoWidgets import DIR_CONFIG_POTATO, PotatoLoop
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/PotatoWidgets/__init__.py", line 23, in <module>
    from . import Widget
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/PotatoWidgets/Widget/__init__.py", line 50, in <module>
    from .Box import Box
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/PotatoWidgets/Widget/Box.py", line 1, in <module>
    from ..Imports import *
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/PotatoWidgets/Imports.py", line 45, in <module>
    from gi.repository import (Gdk, GdkPixbuf, Gio, GLib, GObject, Gtk,
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 813, in module_from_spec
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/gi/importer.py", line 147, in create_module
    dynamic_module = load_overrides(introspection_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/gi/overrides/__init__.py", line 112, in load_overrides
    override_mod = importlib.import_module(override_package_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/gi/overrides/Gtk.py", line 100, in <module>
    class Widget(Gtk.Widget):
                 ^^^^^^^^^^
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/gi/module.py", line 177, in __getattr__
    interfaces = tuple(interface for interface in get_interfaces_for_object(info)
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/gi/module.py", line 99, in get_interfaces_for_object
    interfaces.append(getattr(module, name))
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/gi/overrides/__init__.py", line 31, in __getattr__
    return getattr(self._introspection_module, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/gi/module.py", line 217, in __getattr__
    wrapper = metaclass(name, bases, dict_)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/miniconda3/envs/potato/lib/python3.12/site-packages/gi/types.py", line 247, in __init__
    register_interface_info(cls.__info__.get_g_type())
TypeError: must be an interface

before creating the venv, i got this error, with the updated thing you gave:

GPU_INFO = next(
    (i.split() for i in GPU_INFO if "Model:" in i),
    ["Model", "not", "found"],
)
(Hyprland:274127): Gtk-WARNING **: 16:53:11.942: Theme parsing error: gtk.css:95:30: '' is not a valid color name

... (same errors with different timestamps)

(Hyprland:274127): Gtk-WARNING **: 16:53:11.976: Theme parsing error: gtk.css:122:58: Expected a valid selector

(Hyprland:274127): VTE-WARNING **: 16:53:21.276: (../vte/src/vtepty.cc:667):bool _vte_pty_spawn_sync(VtePty*, const char*, const char* const*, const char* const*, GSpawnFlags, GSpawnChildSetupFunc, gpointer, GDestroyNotify, GPid*, int, GCancellable*, GError**): runtime check failed: ((spawn_flags & ignored_spawn_flags()) == 0)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/daUnknownCoder/.config/potato/Hyprland/__main__.py", line 6, in <module>
    from modules import *
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/__init__.py", line 1, in <module>
    from .windows import *
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/__init__.py", line 7, in <module>
    from .startmenu import StartMenuWindow
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/startmenu.py", line 160, in <module>
    CategorizedAppsList: List[Widget.Box] = [
                                            ^
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/startmenu.py", line 168, in <listcomp>
    + [GenerateAppCategory(j) for j in i["apps"]],
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/startmenu.py", line 168, in <listcomp>
    + [GenerateAppCategory(j) for j in i["apps"]],
       ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daUnknownCoder/.config/potato/Hyprland/modules/windows/startmenu.py", line 61, in GenerateAppCategory
    Widget.Image(
  File "/home/daUnknownCoder/.local/lib/python3.11/site-packages/PotatoWidgets/Widget/Image.py", line 38, in __init__
    self.set_image(path)
  File "/home/daUnknownCoder/.local/lib/python3.11/site-packages/PotatoWidgets/Widget/Image.py", line 50, in set_image
    pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-file-error-quark: Failed to open file/opt/chromium.org/thorium/thorium_shell.png”: No such file or directory (4)

heya did you find any relevant thing?