Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 下的Bug #10

Open
onsunsl opened this issue Mar 10, 2017 · 0 comments
Open

python3 下的Bug #10

onsunsl opened this issue Mar 10, 2017 · 0 comments

Comments

@onsunsl
Copy link

onsunsl commented Mar 10, 2017

C:\Anaconda3\python.exe D:/AnyCode/python/Robot3D/BaiduVoiceAPI_Python-master/baidu.py
Traceback (most recent call last):
File "D:/AnyCode/python/Robot3D/BaiduVoiceAPI_Python-master/baidu.py", line 463, in
t = TTS()
File "D:/AnyCode/python/Robot3D/BaiduVoiceAPI_Python-master/baidu.py", line 149, in init
self.token = GetToken(self.app_key, self.secret_key)
File "D:/AnyCode/python/Robot3D/BaiduVoiceAPI_Python-master/baidu.py", line 26, in GetToken
response = urlopen("https://openapi.baidu.com/oauth/2.0/token", data=urlencode(data))
File "C:\Anaconda3\lib\urllib\request.py", line 161, in urlopen
return opener.open(url, data, timeout)
File "C:\Anaconda3\lib\urllib\request.py", line 461, in open
req = meth(req)
File "C:\Anaconda3\lib\urllib\request.py", line 1112, in do_request_
raise TypeError(msg)
TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str.

Process finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant