Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when spawning new scratchpad window #24

Closed
James-Randall-14 opened this issue Nov 12, 2023 · 5 comments
Closed

Error when spawning new scratchpad window #24

James-Randall-14 opened this issue Nov 12, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@James-Randall-14
Copy link

James-Randall-14 commented Nov 12, 2023

Trying to add some scratchpad windows to my hyprland config (built from source on Arch), encountering the following error:

Bug detected, please report on https://github.com/fdev31/pyprland/issues
Client address is invalid
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pyprland/command.py", line 75, in _callHandler
    await getattr(plugin, full_name)(*params)
  File "/usr/lib/python3.11/site-packages/pyprland/plugins/scratchpads.py", line 468, in run_toggle
    await self.run_show(uid)
  File "/usr/lib/python3.11/site-packages/pyprland/plugins/scratchpads.py", line 519, in run_show
    await item.updateClientInfo()
  File "/usr/lib/python3.11/site-packages/pyprland/plugins/scratchpads.py", line 194, in updateClientInfo
    client_info = await get_client_props(addr="0x" + self.address)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pyprland/plugins/scratchpads.py", line 52, in get_client_props
    assert len(addr) > 2, "Client address is invalid"
           ^^^^^^^^^^^^^
AssertionError: Client address is invalid

The contents of my pyprland.conf:

{
  "pyprland": {
    "plugins": [
      "scratchpads",
      "lost_windows"
    ]
  },
  "scratchpads": {
    "volume": {
      "command": "pavucontrol",
      "animation": "fromRight",
      "margin": 40,
      "size": "20% 40%",
      "position": "75% 55%",
      "lazy": true
    }
  }
}

And the relevant parts of my hyprland.conf:

# Scratchpad Configuration
# Add scratchpads in pyprland.conf

bind = $mainMod,V,exec,pypr toggle volume
windowrule = float,^(pavucontrol)$
windowrule = workspace special silent,^(pavucontrol)$

EDIT: Just noticed that I do not get this printout when I run pypr toggle volume, only when I launch the window with my Hyprland binding.

@fdev31
Copy link
Collaborator

fdev31 commented Nov 12, 2023

Can you provide a bit more details ?
Is the log on start or when you try to show the scratch ?
Do you have an existing pavucontrol running which may prevent this one to fully start ?
Does it happen if you use another app which is quick to start, like a terminal ?

There should be zero differences between toggling a command via hyprland's binding or in a terminal, I'm a bit confused here. Did you ever install pyprland "by hand" ? (no using the AUR package)

Please provide a minimal session example containing the full log.
Also note that I updated the AUR package just now ;)

@James-Randall-14
Copy link
Author

I built from source to install, without the AUR package. I will try the AUR package now. The issue occurs whenever I try to show a scatchpad, and I don't have an existing pavucontrol instance. And it does still occur when I launch alacritty instead of pavucontrol.
Thanks : >

@fdev31
Copy link
Collaborator

fdev31 commented Nov 13, 2023

Remove any "manual install" and try to play with the options "animation" & "lazy".
Then please the full logs (or at least some history before the problem) so I can have a look.

@fdev31
Copy link
Collaborator

fdev31 commented Nov 14, 2023

I made a lot of changes to sanitize the code recently.
I have high hopes your issue comes from the JSON syntax (moving to TOML should fix it) or has been addressed in version 1.5.1.

@fdev31 fdev31 self-assigned this Nov 15, 2023
@fdev31
Copy link
Collaborator

fdev31 commented Nov 22, 2023

Please reopen with the requested information if you experience something similar with the latest version. I'm assuming this has been fixed.

@fdev31 fdev31 closed this as completed Nov 22, 2023
@fdev31 fdev31 added the bug Something isn't working label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants