[GH-ISSUE #214] error 500 in host overview page #168

Closed
opened 2026-02-27 16:38:14 +03:00 by kerem · 3 comments
Owner

Originally created by @bsavelev on GitHub (Jan 29, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/214

when I open /host/2/ page
then every minute I receive error 500 mails:

Traceback (most recent call last):

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/var/www/webvirtmgr/hostdetail/views.py", line 50, in cpuusage
    datasets.append(int(cpu_usage['usage']))

TypeError: 'int' object has no attribute '__getitem__'


<WSGIRequest
path:/info/cpu/2/,
Traceback (most recent call last):

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/var/www/webvirtmgr/hostdetail/views.py", line 118, in memusage
    datasets.append(int(mem_usage['usage']) / 1048576)

TypeError: 'int' object has no attribute '__getitem__'


<WSGIRequest
path:/info/memory/2/,
Originally created by @bsavelev on GitHub (Jan 29, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/214 when I open `/host/2/` page then every minute I receive error 500 mails: ``` Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/var/www/webvirtmgr/hostdetail/views.py", line 50, in cpuusage datasets.append(int(cpu_usage['usage'])) TypeError: 'int' object has no attribute '__getitem__' <WSGIRequest path:/info/cpu/2/, ``` ``` Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/var/www/webvirtmgr/hostdetail/views.py", line 118, in memusage datasets.append(int(mem_usage['usage']) / 1048576) TypeError: 'int' object has no attribute '__getitem__' <WSGIRequest path:/info/memory/2/, ```
kerem closed this issue 2026-02-27 16:38:14 +03:00
Author
Owner

@retspen commented on GitHub (Jan 29, 2014):

Cant you add this in file /var/www/webvirtmgr/hostdetail/view.py on line 117:

print mem_usage['usage']

and run webvirtmgr in develop mode

<!-- gh-comment-id:33617253 --> @retspen commented on GitHub (Jan 29, 2014): Cant you add this in file /var/www/webvirtmgr/hostdetail/view.py on line 117: print mem_usage['usage'] and run webvirtmgr in develop mode
Author
Owner

@retspen commented on GitHub (Jan 29, 2014):

Move to nginx - https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

<!-- gh-comment-id:33623384 --> @retspen commented on GitHub (Jan 29, 2014): Move to nginx - https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr
Author
Owner

@bsavelev commented on GitHub (Jan 30, 2014):

move to gunicorn!

fixed)

no error with gunicorn

<!-- gh-comment-id:33661489 --> @bsavelev commented on GitHub (Jan 30, 2014): > move to gunicorn! fixed) no error with gunicorn
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#168
No description provided.