[GH-ISSUE #215] local variable 'disk_cache' referenced before assignment #144

Closed
opened 2026-02-27 15:57:29 +03:00 by kerem · 3 comments
Owner

Originally created by @lord-kyron on GitHub (Jan 10, 2019).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/215

@catborise - after the latest commit to your own webvirctloud repo, I am getting this when I try to open running VM:

Request Method: GET
http://rack.bigspace.top:443/instances/1/Ubuntu_web/
1.11.18
UnboundLocalError
local variable 'disk_cache' referenced before assignment
/srv/webvirtcloud/vrtManager/instance.py in disks, line 280
/srv/webvirtcloud/venv/bin/python2
2.7.15
['/srv/webvirtcloud', '/srv/webvirtcloud/venv/bin', '/srv/webvirtcloud/venv/lib/python2.7', '/srv/webvirtcloud/venv/lib/python2.7/plat-x86_64-linux-gnu', '/srv/webvirtcloud/venv/lib/python2.7/lib-tk', '/srv/webvirtcloud/venv/lib/python2.7/lib-old', '/srv/webvirtcloud/venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/webvirtcloud/venv/local/lib/python2.7/site-packages', '/srv/webvirtcloud/venv/lib/python2.7/site-packages']
Thu, 10 Jan 2019 14:05:05 +0000
Originally created by @lord-kyron on GitHub (Jan 10, 2019). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/215 @catborise - after the latest commit to your own webvirctloud repo, I am getting this when I try to open running VM: Request Method: | GET -- | -- http://rack.bigspace.top:443/instances/1/Ubuntu_web/ 1.11.18 UnboundLocalError local variable 'disk_cache' referenced before assignment /srv/webvirtcloud/vrtManager/instance.py in disks, line 280 /srv/webvirtcloud/venv/bin/python2 2.7.15 ['/srv/webvirtcloud', '/srv/webvirtcloud/venv/bin', '/srv/webvirtcloud/venv/lib/python2.7', '/srv/webvirtcloud/venv/lib/python2.7/plat-x86_64-linux-gnu', '/srv/webvirtcloud/venv/lib/python2.7/lib-tk', '/srv/webvirtcloud/venv/lib/python2.7/lib-old', '/srv/webvirtcloud/venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/webvirtcloud/venv/local/lib/python2.7/site-packages', '/srv/webvirtcloud/venv/lib/python2.7/site-packages'] Thu, 10 Jan 2019 14:05:05 +0000
kerem closed this issue 2026-02-27 15:57:30 +03:00
Author
Owner

@lord-kyron commented on GitHub (Jan 10, 2019):

I think I've found the issue:
line 251 in vrtManager/instace.py

disk_format = used_size = disk_size = None

should include 'disk_cache' also, cause in my case some drives does not have cache, but it cannot give me cache: none and it crashes.
I've fixed this locally, but you may want to fix it there.

<!-- gh-comment-id:453110497 --> @lord-kyron commented on GitHub (Jan 10, 2019): I think I've found the issue: line 251 in vrtManager/instace.py disk_format = used_size = disk_size = None should include 'disk_cache' also, cause in my case some drives does not have cache, but it cannot give me cache: none and it crashes. I've fixed this locally, but you may want to fix it there.
Author
Owner

@catborise commented on GitHub (Jan 12, 2019):

Thanks bandic i will fix. You are right.

<!-- gh-comment-id:453780646 --> @catborise commented on GitHub (Jan 12, 2019): Thanks bandic i will fix. You are right.
Author
Owner

@lord-kyron commented on GitHub (Jan 17, 2019):

Fixed! Thanks!

<!-- gh-comment-id:455165898 --> @lord-kyron commented on GitHub (Jan 17, 2019): Fixed! Thanks!
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/webvirtcloud#144
No description provided.