JustTemmie / steam-presence

A script that takes the game you're playing on steam and displays it on discord
MIT License
220 stars 15 forks source link

Suddenly stopped working #51

Closed TheCheddarCheese closed 1 month ago

TheCheddarCheese commented 1 month ago

It worked just fine for a while, but now when I check the status with systemctl I get this error:


maj 21 15:16:33 HomeOfHatsuneMiku python[1203]:     import requests
maj 21 15:16:33 HomeOfHatsuneMiku python[1203]: ModuleNotFoundError: No module named 'requests'
maj 21 15:16:33 HomeOfHatsuneMiku python[1203]: During handling of the above exception, another exception occurred:
maj 21 15:16:33 HomeOfHatsuneMiku python[1203]: Traceback (most recent call last):
maj 21 15:16:33 HomeOfHatsuneMiku python[1203]:   File "/home/saki/steam-presence/main.py", line 38, in <module>
maj 21 15:16:33 HomeOfHatsuneMiku python[1203]:     answer = input("looks like either requests, pypresence, steamgrid, psutil, or beautifulSoup is not installed, do you want to install them? (y/n) ")
maj 21 15:16:33 HomeOfHatsuneMiku python[1203]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
maj 21 15:16:33 HomeOfHatsuneMiku python[1203]: EOFError: EOF when reading a line
maj 21 15:16:33 HomeOfHatsuneMiku systemd[1187]: steam-presence.service: Main process exited, code=exited, status=1/FAILURE
maj 21 15:16:33 HomeOfHatsuneMiku systemd[1187]: steam-presence.service: Failed with result 'exit-code'.

Requests is installed and importing it with the terminal works, so I have no idea why this could be happening. When I run main.py to install it, it tries to use pip which I can't use because it's an externally managed environment (so I have to use pacman). Any idea what could be happening here?

JustTemmie commented 1 month ago

the installer should be making a venv folder, try executing main.py with that binary?

Sid127 commented 1 month ago

I ran into this as well. You need to recreate the venv (so uninstall and then reinstall) if your python installation upgraded (from 3.11 to 3.12)

JustTemmie commented 1 month ago

I ran into this as well. You need to recreate the venv (so uninstall and then reinstall) if your python installation upgraded (from 3.11 to 3.12)

yeah this actually makes sense, i'll probably get around to making a repair script, or add a repair mode to the installer - closing for now as this is almost definitely the issue