watson-developer-cloud / speech-to-text-websockets-python

Python client that interacts with the IBM Watson Speech To Text service through its WebSockets interface
http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/speech-to-text.html
86 stars 63 forks source link

I have a problem with TypeError: a bytes-like object is required, not 'str' #23

Closed HayongLee closed 5 years ago

HayongLee commented 6 years ago

I've got this error at line 350

auth = args.credentials[0] + ":" + args.credentials[1] headers["Authorization"] = "Basic " + base64.b64encode(auth)

how should I solve it?

2017-10-05 12 39 29
GuiJordao21 commented 6 years ago

same problem here. I have no ideia what i could do

albertobeto commented 6 years ago

I replaced the line with: headers["Authorization"] = "Basic " + base64.b64encode(auth.encode()).decode()