Python ASCII codec can't encode character error during write to CSV

后端 未结 2 1286
悲哀的现实
悲哀的现实 2020-12-05 21:23

I\'m not entirely sure what I need to do about this error. I assumed that it had to do with needing to add .encode(\'utf-8\'). But I\'m not entirely sure if that\'s what I n

2条回答
  •  粉色の甜心
    2020-12-05 21:36

    I found the easiest option, in addition to Alastair's excellent suggestions, to be using python3 instead of python 2. all it required in my script was to change wb in the open statement to simply w in accordance with Python3's syntax.

提交回复
热议问题