I installed pyvbox 0.2.2 using pip install ... on Mac OS X 10.10 and ran into an error
Traceback (most recent call last):
...
description = target_vm.export_to(appliance, appliance_folder)
File "/Users/<username>/.virtualenvs/pyvbox/lib/python2.7/site-packages/virtualbox/library_ext/machine.py", line 192, in export_to
in_p=[appliance, location])
File "/Users/<username>/.virtualenvs/pyvbox/lib/python2.7/site-packages/virtualbox/library_base.py", line 171, in _call
method = self._search_attr(name)
File "/Users/<username>/.virtualenvs/pyvbox/lib/python2.7/site-packages/virtualbox/library_base.py", line 152, in _search_attr
raise AttributeError("Failed to find attribute %s in %s" % (name, self))
AttributeError: Failed to find attribute export in <VM name>
when trying to export an appliance. The comment next to the export_to(...) function in question
# BUG: xidl describes this function as exportTo. The interface seems
# to export plain "export" instead...
seems to indicate there is/was a mix-up with function names.
I had to change the code in line 191 from self._call("export", ... to self._call("exportTo", ... to fix the error. My speculation is that the mentioned bug existed previously (i.e. for earlier versions of VirtualBox), but has now been fixed; I'm not entirely sure which parts this concerns, though.
I have installed the latest VirtualBox 5.0.8 r103449 and I presume pyvbox picks up stuff from that.
If you could kindly tell me how to get the version of the underlying VirtualBox Python modules, I'd be happy to try and provide a pull request with version-specific handling.
I installed
pyvbox
0.2.2 usingpip install ...
on Mac OS X 10.10 and ran into an errorwhen trying to export an appliance. The comment next to the
export_to(...)
function in questionseems to indicate there is/was a mix-up with function names.
I had to change the code in line 191 from
self._call("export", ...
toself._call("exportTo", ...
to fix the error. My speculation is that the mentioned bug existed previously (i.e. for earlier versions of VirtualBox), but has now been fixed; I'm not entirely sure which parts this concerns, though.I have installed the latest VirtualBox
5.0.8 r103449
and I presumepyvbox
picks up stuff from that.If you could kindly tell me how to get the version of the underlying VirtualBox Python modules, I'd be happy to try and provide a pull request with version-specific handling.