[ovirt-users] debuging Python SDK

Fabrice Bacchella fabrice.bacchella at orange.fr
Mon Apr 11 10:24:37 UTC 2016


I writting code to generate a VM.

But I'm getting :
Traceback (most recent call last):
  ...
    newvm = self.api.vms.add(params.VM(**kwargs))
  File "build/bdist.macosx-10.10-x86_64/egg/ovirtsdk/infrastructure/brokers.py", line 35195, in add
  File "build/bdist.macosx-10.10-x86_64/egg/ovirtsdk/utils/parsehelper.py", line 53, in toXml
  File "build/bdist.macosx-10.10-x86_64/egg/ovirtsdk/xml/params.py", line 24888, in export_
  File "build/bdist.macosx-10.10-x86_64/egg/ovirtsdk/xml/params.py", line 24946, in exportChildren
AttributeError: 'str' object has no attribute 'export_'

I made a bug in my call to params.VM. But I have no way to know which argument is wrong, the message is too terse :
    AttributeError: 'str' object has no attribute 'export_'

It should be better if the given attribute name was given, it will save me time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160411/88a783d2/attachment-0001.html>


More information about the Users mailing list