VirtualBox

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#8605 closed defect (worksforme)

python: create HDD fails

Reported by: Technologov Owned by:
Component: other Version: VirtualBox 4.0.4
Keywords: Cc:
Guest type: other Host type: Windows

Description

Host: WinXP, python 2.5, VBox 4.0.4

It seems one vbox constant fails: (MediumVariant_Standard)

from vboxapi import VirtualBoxManager

globalmgr = VirtualBoxManager(None, None)
...
progress = medium.createBaseStorage(1024*1024*1024,
globalmgr.constants.MediumVariant_Standard)

results in:

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "D:\DOCUME~1\User\LOCALS~1\Temp\gen_py\2.5\46137EEC-703B-4FE5-AFD4-7C9BBB
BA0259x0x1x3\IMedium.py", line 53, in CreateBaseStorage
   , aVariant)
TypeError: The VARIANT type is unknown (0x00000014)

I tried to use official program "vboxshell.py", and same result:

vbox> createHdd 1000 C:/123tst.vdi
The VARIANT type is unknown (0x00000014)

Clarification: it works on openSUSE 10.3 Linux host. (also python 2.5.x)

I have also tried to use constant value ('0') directly. Same error.

-Technologov, 21.3.2011.

Attachments (1)

vboxshell.patch (1.2 KB ) - added by Technologov 14 years ago.
Here is my patch, that fixes it. MIT licensed.

Download all attachments as: .zip

Change History (3)

comment:1 by Nikolay Igotti, 14 years ago

Resolution: worksforme
Status: newclosed

Tested with Python 2.5 and 2.7 (and current pywin) on 32-bit Windows XP and cannot reproduce this behavior.

comment:2 by Technologov, 14 years ago

You're right... problem only happens with "pywin32-213.win32-py2.5.exe", after upgrade to "pywin32-216.win32-py2.5.exe", it all works !

Old pywin module is buggy.

-Technologov

by Technologov, 14 years ago

Attachment: vboxshell.patch added

Here is my patch, that fixes it. MIT licensed.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette