UnicodeEncodeError
spurznet opened this issue · 5 comments
Hi,
I do not understand any Python (yet) and I only got this error when trying to run the script:
Completed page 40 of 40
Traceback (most recent call last):
File "/Users/scpBook/Downloads/Trakt2Letterboxd-master/Trakt2Letterboxd.py", line 197, in <module>
run()
File "/Users/scpBook/Downloads/Trakt2Letterboxd-master/Trakt2Letterboxd.py", line 191, in run
if write_csv(history, "trakt-exported.csv"):
File "/Users/scpBook/Downloads/Trakt2Letterboxd-master/Trakt2Letterboxd.py", line 178, in write_csv
writer.writerows(history)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py", line 158, in writerows
return self.writer.writerows(rows)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd7' in position 2: ordinal not in range(128)
I run MacOS 10.13
Got the issue, I'll publish a fix soon. Thanks for the report.
I've pushed a fix. Please pull and test again and let me know.
Hey I'm getting some similar error. Running on Win10
Completed page 32 of 32
Traceback (most recent call last):
File "Trakt2Letterboxd.py", line 198, in
run()
File "Trakt2Letterboxd.py", line 192, in run
if write_csv(history, "trakt-exported.csv"):
File "Trakt2Letterboxd.py", line 179, in write_csv
writer.writerow({k:v.encode('utf8') for k,v in row.items()})
File "Trakt2Letterboxd.py", line 179, in
writer.writerow({k:v.encode('utf8') for k,v in row.items()})
AttributeError: 'int' object has no attribute 'encode'
Ouch! Have that fixed now.
Apologies; I didn't test the last fix for all cases. It should be all good now.
Closing this, since there are no further problems reported.