Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unicode error with python 2 and csv output file #221

Closed
edsu opened this issue Apr 24, 2018 · 0 comments
Closed

unicode error with python 2 and csv output file #221

edsu opened this issue Apr 24, 2018 · 0 comments

Comments

@edsu
Copy link
Member

edsu commented Apr 24, 2018

edsu@cloudshell:~$ twarc search obama --format csv --output out
Traceback (most recent call last):
  File "/home/edsu/.local/bin/twarc", line 11, in <module>
    sys.exit(main())
  File "/home/edsu/.local/lib/python2.7/site-packages/twarc/command.py", line 250,
 in main
    csv_writer.writerow(get_row(thing))
  File "/home/edsu/.local/lib/python2.7/site-packages/unicodecsv/py2.py", line 86,
 in writerow
    _stringify_list(row, self.encoding, self.encoding_errors))
  File "/usr/lib/python2.7/codecs.py", line 706, in write
    return self.writer.write(data)
  File "/usr/lib/python2.7/codecs.py", line 369, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 236: ordinal 
not in range(128)
@edsu edsu closed this as completed in 8a00941 Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant