trbs / rfc3161ng

A simple client library for cryptographic timestamping service implementing the protocol from RFC3161. Based on python-rfc3161 with some additional fixes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'

Pablo849 opened this issue · comments

File "/Users/MacBook/Proyectos/env-parques/lib/python3.4/site-packages/rfc3161ng/api.py", line 253, in call
base64string = base64.standard_b64encode(b'%s:%s' % (username, password))
TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'

When I try to connect with username and password
Python: 3.4.4

commented

This is because % string formatting is not supported in python 3 prior to 3.5. Solution is to upgrade to 3.5 or later :)