TypeError: expected a character buffer object

Assuming you just want to write the string '649' to the file, change row to '649' or issue f.write(str(row)).

Leave a Comment