sethmlarson / virtualbox-python

Complete implementation of VirtualBox's COM API with a Pythonic interface.
https://pypi.org/project/virtualbox
Apache License 2.0
354 stars 75 forks source link

Failed to find attribute videoCaptureFile #38

Closed amazpyel closed 9 years ago

amazpyel commented 9 years ago

I tried to run example of capturing video (https://gist.github.com/mjdorma/9045317) and got the following error:

Traceback (most recent call last):
  File "capture_video.py", line 13, in <module>
    session.machine.video_capture_file = os.path.abspath("test.webm")
  File "/usr/local/lib/python2.7/dist-packages/pyvbox-0.2.2-py2.7.egg/virtualbox/library.py", line 9049, in video_capture_file
    return self._set_attr("videoCaptureFile", value)
  File "/usr/local/lib/python2.7/dist-packages/pyvbox-0.2.2-py2.7.egg/virtualbox/library_base.py", line 163, in _set_attr
    attr = self._search_attr(name, prefix='set')
  File "/usr/local/lib/python2.7/dist-packages/pyvbox-0.2.2-py2.7.egg/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 videoCaptureFile in Windows 7

I just renamed win7 to Windows 7 .

Environment: -Python 2.7.3 -Ubuntu 12.04.5 -pyvbox-0.2.2 -Virtual Box 4.1.18r78361

mjdorma commented 9 years ago

Hi,

Maybe this attribute didn't exist in VirtualBox 4.1? The API was generated against the last 4.3x release.

You have just reminded me that I need to start moving to get 5.x API compatibility (this will be a compatibility breaking change).

Thanks, Mick

amazpyel commented 9 years ago

Hi @mjdorma,

Virtual Box updated (Oracle VM VirtualBox Manager 4.3.30 ) and video capturing feature appeared from Virtual Box UI controls but same error is still present. :(

Thank you, Alex

mjdorma commented 9 years ago

Hi,

Thanks for pointing this out. I just had a look and I think this commit solves your issue. If you patched this over your current install does it resolve your issue? 3188c7472470b64a70d69bc44b186068c0ed59c1

If it does I might backport it from this 1.0.0 branch to a 0.2.3 release.

Cheers

mjdorma commented 9 years ago

I just cherry picked that 1.0.0 commit back to master. Hopefully that will resolve your issue.

amazpyel commented 9 years ago

Thank you, Mick!

It works as expected.