We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This may be user error vs. a bug, but if so maybe a documentation update could be made to explain what I'm doing wrong?
import pidfile import sys import time def main(): time.sleep(5) if __name__ == '__main__': print('Initializing process') try: with pidfile.PIDFile('/var/run/myprogram.pid'): print('Creating PID file...') main() except pidfile.AlreadyRunningError: print('Program already running!') sys.exit(1) sys.exit(0)
Based on the documentation, I expected the above to work, but it doesn't. Instead, I get AttributeError: module 'pidfile' has no attribute 'PIDFile'.
AttributeError: module 'pidfile' has no attribute 'PIDFile'
This is with Python 3.9.2 on Linux 5.15.84, aarch64 (Raspberry Pi), everything is straight from the Raspbian repos on a clean installation.
The text was updated successfully, but these errors were encountered:
Hey, had the same issue. Make sure you didn't do a pip3 pidfile. This is some other library. what you want to do is pip3 install python-pidfile
Sorry, something went wrong.
No branches or pull requests
This may be user error vs. a bug, but if so maybe a documentation update could be made to explain what I'm doing wrong?
Based on the documentation, I expected the above to work, but it doesn't. Instead, I get
AttributeError: module 'pidfile' has no attribute 'PIDFile'
.This is with Python 3.9.2 on Linux 5.15.84, aarch64 (Raspberry Pi), everything is straight from the Raspbian repos on a clean installation.
The text was updated successfully, but these errors were encountered: