Ilya Kulakov <kulakov.ilya at gmail.com> added the comment: I have fixed that problem by ensuring that ctypes-facing code passes bytes, not strings. ---------- _______________________________________ Python tracker <report at bugs.python.org> <https://bugs.python.org/issue32041> _______________________________________