rliou92 / python-umonitor

Manage monitor configuration automatically.
MIT License
40 stars 6 forks source link

umonitor --listen --daemonize fails with AttributeError: module 'daemon' has no attribute 'DaemonContext' #13

Open igavrysh opened 7 months ago

igavrysh commented 7 months ago

Output for umonitor daemonize in my case:

➜  autostart umonitor --listen --daemonize  
Traceback (most recent call last):
  File "/usr/local/bin/umonitor", line 33, in <module>
    sys.exit(load_entry_point('umonitor==20181018', 'console_scripts', 'umonitor')())
  File "/usr/local/lib/python3.10/dist-packages/umonitor-20181018-py3.10-linux-x86_64.egg/umonitor/__init__.py", line 23, in main
    umon.run()
  File "/usr/local/lib/python3.10/dist-packages/umonitor-20181018-py3.10-linux-x86_64.egg/umonitor/umonitor.py", line 47, in run
    with daemon.DaemonContext() as my_daemon:
AttributeError: module 'daemon' has no attribute 'DaemonContext'
igavrysh commented 7 months ago

daemon installation / check log while installing application with sudo python3 setup.py install

Installed /usr/local/lib/python3.10/dist-packages/umonitor-20181018-py3.10-linux-x86_64.egg
Processing dependencies for umonitor==20181018
Searching for daemon==1.2
Best match: daemon 1.2
Processing daemon-1.2-py3.10.egg
daemon 1.2 is already the active version in easy-install.pth

Using /usr/local/lib/python3.10/dist-packages/daemon-1.2-py3.10.egg
Finished processing dependencies for umonitor==20181018
igavrysh commented 7 months ago

resolved the issue for myself by checking this post: https://stackoverflow.com/a/68010664/4874863 e.g. ran

sudo pip uninstall daemon
sudo pip install python-daemon