The example given in the documentation:
att_content = base64.b64encode(att_file.read())
does not work, because the content string in the generated XML has a leading literal "b" and is enclosed with quotes (b'XXXXX' instead of just XXXXX). As a result, the contents is stored in OTRS but unreadable due to those unwanted characters.
As a workaround, I was obliged to do:
att_content = base64.b64encode(att_file.read()).decode('utf-8')
But the root cause of this is probably a bug in the way "unicode" function is defined in client.py when using python 3.
The example given in the documentation:
att_content = base64.b64encode(att_file.read())
does not work, because the content string in the generated XML has a leading literal "b" and is enclosed with quotes (b'XXXXX' instead of just XXXXX). As a result, the contents is stored in OTRS but unreadable due to those unwanted characters.
As a workaround, I was obliged to do:
att_content = base64.b64encode(att_file.read()).decode('utf-8')
But the root cause of this is probably a bug in the way "unicode" function is defined in client.py when using python 3.