Python Client Library - importIssuesXml help

I'm having trouble getting the importIssuesXml() method to work and I'd appreciate some insight into what I might be doing wrong. The relevant section of code is below:

     xml = parse('myData.xml').toxml('UTF-8')
     connection = Connection('http://*******.myjetbrains.com/youtrack', loginID, loginPWD)
     connection.importIssuesXml('ut', 'utest-developers', xml)

When I run the script in terminal, it thinks for a few seconds and then completes with no output (successful or error). If I change the loginID variable or the loginPWD variable, it comes back with a 403 forbidden error, so the connection call seems to be working. If I remove the .toxml() call, it gives me an error that it doesn't have function __len__, so I'm assuming variable xml should be a string, but I could be wrong on that.

From reading the documentation I would expect that youtrack should be sending back an import report that indicates whether an issue was successfully imported or failed, but it's currently not sending back anything at all.

Any help would be appreciated.
2 comments
Comment actions Permalink
Hello, Peter!
Change last line to
print connection.importIssuesXml('ut', 'utest-developers', xml)
prettyPrint();
and you'll be able to see xml response.
0
Comment actions Permalink
Thanks! That did the trick.
0

Please sign in to leave a comment.