-
Notifications
You must be signed in to change notification settings - Fork 36
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
Psystemd not working properly with PyInstaller #90
Comments
I'm having the same issue. Here is my code:
I'm getting this error:
I'm getting the same error whether I run the executable with sudo -E dist/main/main or dist/main/main. The script works fine in my poetry package. This is the pyinstaller output when it is ran with poetry run pyinstaller src/hardshell/main.py
I have to wonder if pyinstaller isn't picking up all of the dependencies. Thoughts? |
I was able to fix the issue by adding these to my spec file:
|
In my project I needed a way to handle systemctl signals gracefully so I decided to use psystemd. Other alternatives did not perform properly. My main goal is to convert my Python script to executable and make it run as a service in the backgorund. The main problem I am facing rn is that my code cannot process systemctl stop signal gracefully. The way I implemented psystemd is given below.
It is initiated inside the Dlp_Service constructor like
self.unit = Unit(b"myservice.service")
.The error message is "ModuleNotFoundError: No module named 'pystemd.dbusexc'". The executable is created inside a virtual environment that has psystemd installed and this program works flawless as a Python script. How can i handle this error and use my program as executable?
The text was updated successfully, but these errors were encountered: