<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">​Then I don't know :( no such exception is documented (even tho its significance is clear) and I don't know which parameter is wrong or invalid.</div>

<div class="gmail_default" style="font-family:verdana,sans-serif">Hopefully the devs will have an answer.​</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 June 2014 17:01, Karoline Haus <span dir="ltr"><<a href="mailto:karolinehaus@yahoo.de" target="_blank">karolinehaus@yahoo.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">

<div><span>Yes it is an array. The type of size is int as there is no long type in Python.</span></div> <div><br><br></div><div style="display:block"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">

 <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt"> <div dir="ltr"> <font face="Arial"> Maxime Dor <<a href="mailto:maxime.dor@altherian.org" target="_blank">maxime.dor@altherian.org</a>> schrieb am 15:07 Freitag, 6.Juni 2014:<br>

 </font> </div><div><div class="h5">  <br><br> <div><div><div><div dir="ltr"><div style="font-family:verdana,sans-serif">Never wrote python, but it looks good. Can you simply
 confirm that self.vboxMgr.constants.MediumVariant_Standard is given in an array? (it looks like but not sure).</div>

<div style="font-family:verdana,sans-serif">Else, the size needs to be a long, if such type exists in Python.</div></div><div><div><br clear="none"><br clear="none"><div>On 6 June 2014 11:28, Karoline Haus <span dir="ltr"><<a rel="nofollow" shape="rect" href="mailto:karolinehaus@yahoo.de" target="_blank">karolinehaus@yahoo.de</a>></span> wrote:<br clear="none">



<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">



<div><span>This is the very simple code that fails over and over again and I don't know how to fix it:</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">



<br clear="none"><span></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>format='vdi'</span></div>



<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>diskImagePath='/home/user/test.vdi'</span></div>



<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>size=10000000</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">



<span><br clear="none"></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>hdd = self.vboxMgr.vbox.createHardDisk(format, diskImagePath)<br clear="none">



        try:<br clear="none">            progress = hdd.createBaseStorage(size,<br clear="none">                                             (self.vboxMgr.constants.<br clear="none">                                              MediumVariant_Standard,))<br clear="none">

</span></div>

<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">...</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">



<br clear="none"><span></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>This code throws an exception and tells me error code VERR_INVALID_PARAMETER as mentioned above. Any idea how to fix this?</span></div>



<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">It fails in createBaseStorage().<br clear="none">

<span></span></div>

<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>Thanks!<br clear="none"></span></div> <div>

<br clear="none"><br clear="none"></div>

<div style="display:block"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">



 <div dir="ltr"> <font face="Arial"> Maxime Dor <<a rel="nofollow" shape="rect" href="mailto:maxime.dor@altherian.org" target="_blank">maxime.dor@altherian.org</a>> schrieb am 8:58 Freitag, 6.Juni 2014:<br clear="none">

 </font> </div><div><div>
  <br clear="none">
<br clear="none"> <div><div><div><div dir="ltr"><div style="font-family:verdana,sans-serif">Provide the part of your code that fails please, else it's a bit hard to give you pointers.</div></div><div><br clear="none">

<br clear="none">

<div>

On 5 June 2014 16:25, Karoline Haus <span dir="ltr"><<a rel="nofollow" shape="rect" href="mailto:karolinehaus@yahoo.de" target="_blank">karolinehaus@yahoo.de</a>></span> wrote:<br clear="none"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt"><div>Hi I'm trying to create a virtual hard drive using the Python API. <br clear="none">





</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br clear="none"></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">





I can successully create the IMedium object using IVirtualBox::createHardDisk() but then when I try to call createBaseStorage() on that object, I can an error saying "Error in module Medium (VERR_INVALID_PARAMETER)" but I do not get any further details on what the problem is.
 <br clear="none"></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br clear="none"></div>



<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">

According to the SDK documentation, the only error for this function should be if the medium format is not supported by my system ("The variant of storage creation operation is not supported."), but I am just trying to create a VDI disk, and when I list the HDD backends using VBoxManage, it is definitely supported. The path I'm trying to create the virtual disk under is also accessible and writable.</div>





<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br clear="none"></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">





What else can the problem be? I do not seem to be able to dig deeper into this. I'm using the <i>MediumVariant_Standard</i> variant, so there is nothing special about this either.<br clear="none"></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">





<br clear="none"></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">Any pointers would be really appreciated.<br clear="none">





</div></div></div></div><br clear="none">_______________________________________________<br clear="none">
vbox-dev mailing list<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br clear="none"><br clear="none"></div>  </div></div></div> </div>  </div> </div></div></blockquote></div><br clear="none"></div></div></div></div><br>

<br></div>  </div></div></div> </div>  </div> </div></div></blockquote></div><br></div>