更新时间:2023-10-03 19:29:04
您没有正确使用bytes
函数.检查一下:
You are not using the bytes
function correctly. Check this:
>>> a = "hi"
>>> bytes(a, encoding='utf8')
b'hi'
您可以尝试:
bytes((create_jsonlines(source)), encoding='utf8')
encoding
是bytes
函数的参数,您正在该函数之外使用它.
encoding
is the argument of the bytes
function, and you are using it outside of that function.