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 start Glances 3.4.0.1 on Windows 10: SIGHUP not defined #2408

Closed
Hakugin opened this issue May 18, 2023 · 4 comments
Closed

Cannot start Glances 3.4.0.1 on Windows 10: SIGHUP not defined #2408

Hakugin opened this issue May 18, 2023 · 4 comments

Comments

@Hakugin
Copy link

Hakugin commented May 18, 2023

I am attempting to install and run Glances on a few Windows 10 hosts so that I can receive their status in Home Assistant. The installation completed without errors but I am unable to start Glances. Instead of Glances starting as expected I get a traceback error that SIGHUP is not defined. Searching through issues on GitHub I came across "Improve kill signal management #2194", #2194, where SIGHUP was added to resolve a bug on Linux systems. Unfortunately Windows does not have SIGHUP defined.

I ran the following:

  1. Install Python 3.10.9
  2. pip install psutil, future, bottle, chardet, idna, urllib3, requests, glances
  3. pip install windows-curses
  4. glances

Receive traceback:
Traceback (most recent call last):
File "C:\Users<user>\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users<user>\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users<user>\AppData\Local\Programs\Python\Python310\Scripts\glances.exe_main
.py", line 7, in
File "C:\Users<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\glances_init
.py", line 160, in main
for sig in (signal.SIGTERM, signal.SIGINT, signal.SIGHUP):
AttributeError: module 'signal' has no attribute 'SIGHUP'

Environment:
Windows 10 Pro 10.0.19045
Python 3.10.9 (64Bit)
Glances 3.4.0.1

@Hakugin
Copy link
Author

Hakugin commented May 18, 2023

For additional information, I recently tried installing Glances 3.0 to see if I could use a previous version but received a different error related to the version of Python I have installed. With 3.0 I get "AttributeError: 'ThreadScanner' object has no attribute 'isAlive'" which is due to the function isAlive() being renamed to is_alive() in Python 3.9 and later. If needed I can open a separate issue for this.

@nicolargo
Copy link
Owner

@Hakugin it is not necessary, the latest Glances version use is_alive() instead of isAlive().

Will try to make an hotfix asap on the 3.4.0.2 version.

@nicolargo
Copy link
Owner

Should be corrected in the hotfix available in Glances 3.4.0.2 (available now on Pypi).

Can you test it @Hakugin ?

@Hakugin
Copy link
Author

Hakugin commented May 19, 2023

Should be corrected in the hotfix available in Glances 3.4.0.2 (available now on Pypi).

Can you test it @Hakugin ?

Sorry for the delayed reply. I can confirm 3.4.0.2 is working on Windows 10. I was able to go through the steps above on a fresh install and launch "glances -w" without any errors. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants