You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Python 3, encoding='utf8' returns a bytestring instead of a string. I recommend using tostring(xml, encoding="unicode") instead. – Stevoisiak Feb 7 '18 at 19:18
So I believe you need to change line 159 in tools.py from: return ElementTree.tostring(pretty_data, encoding='UTF-8')
to return ElementTree.tostring(pretty_data, encoding='unicode')
I did this locally and it fixed the error for me.
The text was updated successfully, but these errors were encountered:
When trying to print a computer group object I got the error:
"errorMessage": "__str__ returned non-string (type bytes)"
As per this comment on https://stackoverflow.com/questions/15304229/convert-python-elementtree-to-string:
So I believe you need to change line 159 in tools.py from:
return ElementTree.tostring(pretty_data, encoding='UTF-8')
to
return ElementTree.tostring(pretty_data, encoding='unicode')
I did this locally and it fixed the error for me.
The text was updated successfully, but these errors were encountered: