I'm running the python sdk 4.1.3 again a ovirt instance release 4.0.4.4-1.el7.centos. I tried to run the sample code https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/get_display_ticket.py but it fails with the message : Entity: line 1: parser error : Extra content at the end of the document ^ And looking in the example.log, I got : DEBUG:root:POST /ovirt-engine/api/vms/61a6de0a-2a21-4e90-bc20-29e3f0cd0ad8/graphicsconsoles/7370696365/ticket HTTP/1.1 .... DEBUG:root:HTTP/1.1 404 Not Found I think i was hit by https://bugzilla.redhat.com/show_bug.cgi?id=1383342. So the failure is not a problem. But I got a meaningless error message. The code got a 404, so why didn't it say so, and instead throws me a message about something else ?
The meaningless error message is a side effect of the combination of bug 1383342 and bug 1440292. In that situation the server returns an HTML error message and we don't check the returned content type, hence we try to parse the HTML as XML, and that is the error that generates. In a normal situation the SDK returns a more reasonable error message, for example, if you do this: vm_service = vms_service.vm_service('doesnotexist') vm_service.get() You get this exception: Traceback (most recent call last): File "...py", line 41, in <module> vm_service.get() File ".../ovirtsdk4/services.py", line 29565, in get self._check_fault(response) File ".../ovirtsdk4/service.py", line 98, in _check_fault Service._raise_error(response, fault) File ".../ovirtsdk4/service.py", line 71, in _raise_error raise Error(msg) ovirtsdk4.Error: HTTP response code is 404. Consider closing this as a duplicate of bug 1440292. Note also that the fix for that bug, isn't complete yet, see the details. I am moving it back to ASSIGNED.
It's version 4.1.3, so there shouldn't be any content-type checking yet, but the issue is that we miss the checking of response code in action methods. Anyway, I will send a fix for both.
Verified on 4.1.3-2