tts = str(Return.split('"')[-14]) with open('tts.txt','w',encoding = 'utf-8') as tts: tts.write(tts)
print(tts) print(type(tts))
错误提示:
Traceback (most recent call last): File "/home/pi/yysb/chat/chat.py", line 44, in <module> tts.write(tts) TypeError: write() argument must be str, not _io.TextIOWrapper