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

Erreur Internal Server Error à partir de la V4.1.0 et suivante #2943

Open
quick-tutoriel opened this issue Sep 16, 2024 · 0 comments
Open
Labels

Comments

@quick-tutoriel
Copy link

J'utilise Glances dans un container et depuis la version 4.1.0, j'ai systématiquement l'erreur "Internal Server Error"
Je précise que j'utilise Glances avec l'images Docker.
Voici les logs :
` raise exc

File "/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

await app(scope, receive, sender)

File "/venv/lib/python3.11/site-packages/starlette/routing.py", line 72, in app

response = await func(request)

           ^^^^^^^^^^^^^^^^^^^

File "/venv/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app

raw_response = await run_endpoint_function(

               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function

return await run_in_threadpool(dependant.call, **values)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool

return await anyio.to_thread.run_sync(func, *args)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync

return await get_async_backend().run_sync_in_worker_thread(

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread

return await future

       ^^^^^^^^^^^^

File "/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run

result = context.run(func, *args)

         ^^^^^^^^^^^^^^^^^^^^^^^^

File "/app/glances/outputs/glances_restful_api.py", line 342, in _index

self.__update__()

File "/app/glances/outputs/glances_restful_api.py", line 160, in update

self.stats.update()

File "/app/glances/stats.py", line 269, in update

self.__update_plugin(p)

File "/app/glances/stats.py", line 258, in __update_plugin

self._plugins[p].update()

File "/app/glances/plugins/plugin/model.py", line 1151, in wrapper

ret = fct(self, *args, **kw)

      ^^^^^^^^^^^^^^^^^^^^^^

File "/app/glances/plugins/plugin/model.py", line 1168, in wrapper

ret = fct(*args, **kw)

      ^^^^^^^^^^^^^^^^

File "/app/glances/plugins/cpu/init.py", line 165, in update

stats = self.update_local()

        ^^^^^^^^^^^^^^^^^^^

File "/app/glances/plugins/plugin/model.py", line 1226, in wrapper

compute_rate(self, stats, self.stats_previous)

File "/app/glances/plugins/plugin/model.py", line 1195, in compute_rate

stat[field] = stat[field] - stat_previous[field + '_gauge']

              ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'`

Si j'utilise une version de l'image Docker <4.1.0, tout fonctionne correctement.

@nicolargo nicolargo added the bug label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants