Add Pritunl Zero via API not working

I try to use API to ad users on pritunl zero, but not working, i have use this code pritunl-zero/tools/ at master · pritunl/pritunl-zero · GitHub

Pritunl Zero uses a SHA512 HMAC instead of the SHA256 HMAC used in Pritunl. The validation code is in pritunl/pritunl-zero/signature/signature.go. The error shown is a unicode error possibly because of the Python 3 detection line if sys.version_info[0] < 3: not working correctly. If it is Python 3 the Python 2 if case should be removed.