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

Glances web server fails to start on windows 11. #3116

Open
Hzipp opened this issue Feb 23, 2025 · 3 comments
Open

Glances web server fails to start on windows 11. #3116

Hzipp opened this issue Feb 23, 2025 · 3 comments

Comments

@Hzipp
Copy link

Hzipp commented Feb 23, 2025

Describe the bug
Glances web server fails to start on windows 11.

I have already tried the mentioned solution from here: #3101

C:\Python313\Scripts>pip uninstall netifaces
WARNING: Skipping netifaces as it is not installed.

C:\Python313\Scripts>pip install netifaces2
Requirement already satisfied: netifaces2 in c:\python313\lib\site-packages (0.0.22)

C:\Python313\Scripts>glances.exe -w
Glances Web User Interface started on http://0.0.0.0:61208/
Glances RESTful API Server started on http://0.0.0.0:61208/api/4
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python313\Scripts\glances.exe\__main__.py", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "C:\Python313\Lib\site-packages\glances\__init__.py", line 173, in main
    start(config=core.get_config(), args=core.get_args())
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python313\Lib\site-packages\glances\__init__.py", line 102, in start
    mode = GlancesMode(config=config, args=args)
  File "C:\Python313\Lib\site-packages\glances\webserver.py", line 35, in __init__
    self.web = GlancesRestfulApi(config=config, args=args)
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python313\Lib\site-packages\glances\outputs\glances_restful_api.py", line 165, in __init__
    self.autodiscover_client = GlancesAutoDiscoverClient(socket.gethostname().split('.', 1)[0], self.args)
                               ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python313\Lib\site-packages\glances\servers_list_dynamic.py", line 196, in __init__
    zeroconf_bind_address = self.find_active_ip_address()
  File "C:\Python313\Lib\site-packages\glances\servers_list_dynamic.py", line 247, in find_active_ip_address
    gateway_itf = netifaces.gateways()[netifaces.AF_INET][0][1]
                  ~~~~~~~~~~~~~~~~~~^^
  File "C:\Python313\Lib\site-packages\netifaces\__init__.py", line 232, in gateways
    raise NotImplementedError("No implementation for `gateways()` yet")
NotImplementedError: No implementation for `gateways()` yet

@andreyryabtsev
Copy link

FWIW the opposite of that solution has been working for me. I.e. glances installs netifaces2 but actually only works with netifaces:

pip uninstall netifaces2
pip install netifaces

But I would love to not have to do that, +1 :)

@Hzipp
Copy link
Author

Hzipp commented Feb 26, 2025

FWIW the opposite of that solution has been working for me. I.e. glances installs netifaces2 but actually only works with netifaces:

pip uninstall netifaces2
pip install netifaces

But I would love to not have to do that, +1 :)

I tried it the other way around, but that didn’t work for me either. :(

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

3 participants