Python 3.1.3 Win 7: csv writerow Error “must be bytes or buffer, not str”

后端 未结 3 1945
野趣味
野趣味 2021-01-14 02:37

Got a simple script which worked perfectly under Python 2.7.1 at my Win xp machine. Now got a win 7 machine with python 3.1.3.

The code is:

owriter.w         


        
3条回答
  •  情书的邮戳
    2021-01-14 03:12

    Probably you need to open the file in text mode. If not, include enough of your code so it's runnable and demonstrates the problem.

提交回复
热议问题