hyprland-community / pyprland

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

[BUG] pyprland getting syntax errors and doesn't start #94

Closed alekgr closed 6 months ago

alekgr commented 6 months ago

Pyprland version Which version did you use? (copy & paste the string returned by pypr version) pypr version 2.2.14

Describe the bug pypr and scratchpads aren't opening getting syntax errors

raceback (most recent call last): File "/usr/lib/python3.12/site-packages/pyprland/command.py", line 486, in main asyncio.run(run_daemon() if invoke_daemon else run_client()) File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/pyprland/command.py", line 327, in run_daemon manager.server = await asyncio.start_unix_server(manager.read_command, CONTROL) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/streams.py", line 113, in start_unix_server return await loop.create_unix_server(factory, path, **kwds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/unix_events.py", line 319, in create_unix_server sock.bind(path) FileNotFoundError: [Errno 2] No such file or directory Traceback (most recent call last): File "/usr/bin/pypr", line 8, in sys.exit(main()) ^^^^^^ File "/usr/lib/python3.12/site-packages/pyprland/command.py", line 497, in main os.unlink(CONTROL) FileNotFoundError: [Errno 2] No such file or directory: '/tmp/hypr/a5a648091760ac002120fab18247e5292b6482de_1714343446_1624847588/.pyprland.sock'

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Configuration (provide following files/samples when relevant):

Additional context Add any other context about the problem here.

Stefanomarton commented 6 months ago

Don't know if it's related, after updating hyprland and pyprland I get this output trying to start pyprland.

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pyprland/command.py", line 482, in main
    asyncio.run(run_daemon() if invoke_daemon else run_client())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pyprland/command.py", line 323, in run_daemon
    manager.server = await asyncio.start_unix_server(manager.read_command, CONTROL)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/streams.py", line 113, in start_unix_server
    return await loop.create_unix_server(factory, path, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/unix_events.py", line 317, in create_unix_server
    sock.bind(path)
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/bin/pypr", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pyprland/command.py", line 493, in main
    os.unlink(CONTROL)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/hypr/33e0bb14786dc22a0c82eaaf097b469d3fdeceea_1714376788_9614021/.pyprland.sock'

pyprland 2.2.14-10 hyprland 0.39.1.r100.33e0bb14-1

Let me know if some log or more informations are needed

fdev31 commented 6 months ago

This seems to relate to #95 - you have a "git version" of Hyprland ?

alekgr commented 6 months ago

yes,the socket thing also effects waybar which has a workaround https://github.com/Alexays/Waybar/issues/3179 which i have verified but still needs to be fixed

Stefanomarton commented 6 months ago

This seems to relate to #95 - you have a "git version" of Hyprland ?

Yes sorry, I was not so updated on stuff going on.

I tested the PR you mentioned and all is working fine.

fdev31 commented 6 months ago

Closing after pushing some code to git that should address this issue.