Closed costimasca closed 1 year ago
String
? Where does that instance come from? I've never seen anything like this before. Could you show me the output when you run python -m pip freeze
?
This is the output for python -m pip freeze
:
numpy==1.15.1
Pillow==5.2.0
pytesseract==0.2.4
pyvbox==1.3.2
vboxapi==1.0
ZSI==2.1a1
The String class is defined in sdk/bindings/webservice/python/lib/VirtualBox_wrappers.py
After I solved the issue yesterday by calling the __str__()
I continued my work to modify my code to work remotely. Sadly, however I noticed a pattern of needing to call __str__
or __int__
on objects returned from VirtualBox_wrappers. Another example would be calling session.console.display.get_screen_resolution(0)
.
Inside the get_screen_resolution function, the
self._call("getScreenResolution", in_p=[screen_id])
function returns:
(<VirtualBox_wrappers.UnsignedInt instance at 0x10b2f4200>, <VirtualBox_wrappers.UnsignedInt instance at 0x10b2f40e0>, <VirtualBox_wrappers.UnsignedInt instance at 0x10b2f4248>, <VirtualBox_wrappers.Int instance at 0x10b2f4290>, <VirtualBox_wrappers.Int instance at 0x10b2f42d8>, <VirtualBox_wrappers.GuestMonitorStatus instance at 0x10b2f4320>)
not actual integers as expected.
I've never needed to call int() or str() on objects returned from vboxapi, may need to take a look at this.
I no longer have time to maintain this library, so am closing this issue.
ENVIRONMENT
master
branch?SUMMARY
The issue appears when trying to connect to a remote VirtualBox server. Instantiating the virtualbox.VirtualBox class fails.
STEPS TO REPRODUCE
Have a Virtual Box server running with the "vboxwebsrv.sh" script.
Run the following code:
EXPECTED RESULTS
ACTUAL RESULTS
PROPOSED SOLUTION
Change the lines of code in library_ext/vbox.py from:
to: