[GH-ISSUE #613] AttributeError: 'str' object has no attribute 'set_cookie' #466

Open
opened 2026-02-27 16:39:22 +03:00 by kerem · 0 comments
Owner

Originally created by @purplesrl on GitHub (Jun 13, 2016).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/613

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'

Originally created by @purplesrl on GitHub (Jun 13, 2016). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/613 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'
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#466
No description provided.