python

在运行中报这个错的话TypeError: a bytes-like object is required, not 'str',我的处理方式是进行字符j转换,转换为:

values = '_'.join(str(args).strip())

 

在运行报这个错的话,是在读取txt文件的时候报这个错,这个时候我们增加一个“ b”,例如:

user_file = open('indo.txt','rb')

 

posted @ 2021-02-01 17:21  泡沫夏  阅读(51)  评论(0)    收藏  举报