webvirtmgr icon indicating copy to clipboard operation
webvirtmgr copied to clipboard

AttributeError: 'str' object has no attribute 'set_cookie'

Open purplesrl opened this issue 9 years ago • 0 comments

I am getting this problem when i try to open console on some guests, using the latest git

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/console/views.py", line 62, in console response.set_cookie('token', token) AttributeError: 'str' object has no attribute 'set_cookie'

It will also get a 500 error in the browser

It seems that on some guests the console_type is set to None, which causes the problem, setting console_type manually to vnc fixes it. I was not able to set it in the GUI, when trying I get:

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/instance/views.py", line 500, in instance conn.set_console_type(console_type) File "/var/www/webvirtmgr/vrtManager/instance.py", line 430, in set_console_type graphic.set('type', console_type) AttributeError: 'NoneType' object has no attribute 'set'

purplesrl avatar Jun 13 '16 10:06 purplesrl