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

Cannot launch pypr #12

Closed
zielOS opened this issue Aug 31, 2023 · 7 comments
Closed

Cannot launch pypr #12

zielOS opened this issue Aug 31, 2023 · 7 comments
Labels
invalid This doesn't seem right

Comments

@zielOS
Copy link

zielOS commented Aug 31, 2023

Hi I am getting this error when I try to launch pypr from terminal. I installed it manually following aur steps. Also tried using pip to install it. Both show the following error

Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pyprland/command.py", line 165, in run_daemon
await manager.load_config() # ensure sockets are connected first
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pyprland/command.py", line 39, in load_config
self.config = json.loads(f.read())
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 14 (char 13)
Exception ignored in: <function StreamWriter.del at 0x7f317ec3d940>
Traceback (most recent call last):
File "/usr/lib/python3.11/asyncio/streams.py", line 396, in del
self.close()
File "/usr/lib/python3.11/asyncio/streams.py", line 344, in close
return self._transport.close()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/selector_events.py", line 860, in close
self._loop.call_soon(self._call_connection_lost, None)
File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
self._check_closed()
File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

@kronikpillow
Copy link

I have the same issue it seems :-/

@fdev31
Copy link
Collaborator

fdev31 commented Oct 15, 2023

I guess pypr daemon isn't running.
Did you add it to autostart or hyprland config ? Do you see any process running ?
ps axuw |grep pypr

Try running with --debug /tmp/pypr.log see if there is any error output in that file.

@ghost
Copy link

ghost commented Oct 24, 2023

I had the same issue after following the steps on the wiki. It seems that the default config provided lacks a comma after one bracket, just before the "unknown" part at the end of the file. Now it works for me.

@fdev31
Copy link
Collaborator

fdev31 commented Oct 25, 2023

Hi! Two things:

@zielOS your JSON config file is invalid indeed. Check the first line, character 13:

json.decoder.JSONDecodeError: Extra data: line 1 column 14 (char 13)

@lunigella I can't find the typo, can you point it to help me?

All: would switching to TOML format a good idea ?

Pros: simpler & more flexible syntax, harder to break
Cons: would add two small dependencies to the python project

@ghost
Copy link

ghost commented Oct 27, 2023

I was referring to line 26 of the config provided in the Getting started session of the wiki.
...
}, <-
"unknown": "wlrlui"
}
}
I have little to no experience with json, so I'm glad this solution worked for me but I'm not sure this will work with zielOS problem.

@fdev31
Copy link
Collaborator

fdev31 commented Oct 27, 2023

I was referring to line 26 of the config provided in the Getting started session of the wiki.

Thank you, just fixed it!

@zielOS
Copy link
Author

zielOS commented Oct 28, 2023

yup that fixed it for me too.

@zielOS zielOS closed this as completed Oct 28, 2023
@fdev31 fdev31 added the invalid This doesn't seem right label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants