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

Tuple vs Dict in PlatformWEBSERVICE #28

Closed nightrune closed 10 years ago

nightrune commented 10 years ago

Pretty small error. I was attempting to use your WebServiceManager for remote control for some tests, and I happened across this bug.

Error Log:

C:\Python27\python.exe C:/Local_Sean/dBA_Sean_Sill/Clients/Eclipse_Computing/VirtualBoxTestingEnv/main.py Traceback (most recent call last): File "C:/Local_Sean/dBA_Sean_Sill/Clients/Eclipse_Computing/VirtualBoxTestingEnv/main.py", line 11, in manager = virtualbox.WebServiceManager() File "C:\Python27\lib\site-packages\virtualboxinit.py", line 179, in init super(WebServiceManager, self).init("WEBSERVICE", params) File "C:\Python27\lib\site-packages\virtualboxinit.py", line 101, in init self.manager = vboxapi.VirtualBoxManager(mtype, mparams) File "C:\Python27\lib\site-packages\vboxapiinit.py", line 959, in init self.platform = PlatformWEBSERVICE(dPlatformParams); File "C:\Python27\lib\site-packages\vboxapiinit.py", line 838, in init self.user = dParams.get("user", "") AttributeError: 'tuple' object has no attribute 'get'

Looks like PlatformWEBSERVICE was expecting a dict instead of a tuple. I'll try to submit a patch quickly.

mjdorma commented 10 years ago

Thanks Sean.

As it turns out I haven't had a need to use the web service api in production (yet), your contribution is much appreciated and I'd be keen to hear how it works out for you.

Cheers

Sent from my iPhone

On 6 Oct 2014, at 7:43 am, Sean Sill notifications@github.com wrote:

Pretty small error. I was attempting to use your WebServiceManager for remote control for some tests, and I happened across this bug.

Error Log:

C:\Python27\python.exe C:/Local_Sean/dBA_Sean_Sill/Clients/Eclipse_Computing/VirtualBoxTestingEnv/main.py Traceback (most recent call last): File "C:/Local_Sean/dBA_Sean_Sill/Clients/Eclipse_Computing/VirtualBoxTestingEnv/main.py", line 11, in manager = virtualbox.WebServiceManager() File "C:\Python27\lib\site-packages\virtualboxinit.py", line 179, in init super(WebServiceManager, self).init("WEBSERVICE", params) File "C:\Python27\lib\site-packages\virtualboxinit.py", line 101, in init self.manager = vboxapi.VirtualBoxManager(mtype, mparams) File "C:\Python27\lib\site-packages\vboxapiinit.py", line 959, in init self.platform = PlatformWEBSERVICE(dPlatformParams); File "C:\Python27\lib\site-packages\vboxapiinit.py", line 838, in init self.user = dParams.get("user", "") AttributeError: 'tuple' object has no attribute 'get'

Looks like PlatformWEBSERVICE was expecting a dict instead of a tuple. I'll try to submit a patch quickly.

— Reply to this email directly or view it on GitHub.

nightrune commented 10 years ago

Very Welcome!

I seem to have issues other than this currently, but heres a nice one liner :D

https://github.com/mjdorma/pyvbox/pull/29

mjdorma commented 10 years ago

Keep the PRs rolling in, I'll happily include them :+1:.