hyprland-community / pyprland

Scratchpads & many goodies for Hyprland [maintainer=@fdev31]
MIT License
346 stars 15 forks source link

[BUG] Opensuse Tumbleweed show error on exit after toggle terminal #129

Closed mjcc30 closed 3 weeks ago

mjcc30 commented 1 month ago

Pyprland version 2.4.0

Describe the bug Opensuse Tumbleweed show error on exit after toggle terminal

To Reproduce Steps to reproduce the behavior:

  1. pipx install pyprland
  2. pypr
  3. pypr toggle term
  4. See error

Expected behavior exit the toggle terminal without error

Configuration (provide following files/samples when relevant):

Fail to parse version tag "0.41.2"
Traceback (most recent call last):
  File "/home/mjcc/.local/share/pipx/venvs/pyprland/lib64/python3.11/site-packages/pyprland/plugins/pyprland.py", line 39, in init
    self.__set_hyprland_version(version_str[1:], auto_increment)
  File "/home/mjcc/.local/share/pipx/venvs/pyprland/lib64/python3.11/site-packages/pyprland/plugins/pyprland.py", line 95, in __set_hyprland_version
    split_version = [int(i) for i in version_str.split(".")[:3]]
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjcc/.local/share/pipx/venvs/pyprland/lib64/python3.11/site-packages/pyprland/plugins/pyprland.py", line 95, in <listcomp>
    split_version = [int(i) for i in version_str.split(".")[:3]]
                     ^^^^^^
ValueError: invalid literal for int() with base 10: ''
Fail to parse version information: {'branch': 'openSUSE', 'commit': '0000000000000000000000000000000000000000', 'dirty': False, 'commit_message': 'Built for x86_64-suse-linux', 'commit_date': 'Thu Jan 01 00:00:00 1970', 'tag': '0.41.2', 'commits': '-1', 'flags': []}

Additional context openSUSE Tumbleweed Linux 6.9.9-1-default zsh 5.9 Hyprland (Wayland) kitty 0.35.2

fdev31 commented 1 month ago

Hi! Can you show me the output of hyprctl -j version please?

drPilman commented 1 month ago

Hi! For some reason the value for the key "tag" does not include the first letter "v"

>hyprctl -j version
{
    "branch": "openSUSE",
    "commit": "0000000000000000000000000000000000000000",
    "dirty": false,
    "commit_message": "Built for x86_64-suse-linux",
    "commit_date": "Thu Jan 01 00:00:00 1970",
    "tag": "0.41.2",
    "commits": "-1",
    "flags": []
}