Closed rexana3 closed 4 years ago
+1
Thank you for your relpy!Can you speak chinese?I put my code in the attachment.
------------------ 原始邮件 ------------------ 发件人: "moyemoji"<notifications@github.com>; 发送时间: 2020年4月11日(星期六) 下午5:55 收件人: "TencentCloud/tencentcloud-sdk-python"<tencentcloud-sdk-python@noreply.github.com>; 抄送: "陈柔洁"<497014168@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [TencentCloud/tencentcloud-sdk-python] a bytes-like object is required, not 'str' (#60)
+1
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
@rexana3 python3 base64.b64encode requires a byte input rather than a string, which means you don't need str(fwave.read()), just fwave.read() should work
File "C:\Users\czy\Anaconda3\lib\base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str'