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

encode error of utf-8 source data #37

Open
Ancoron84 opened this issue Dec 11, 2017 · 2 comments
Open

encode error of utf-8 source data #37

Ancoron84 opened this issue Dec 11, 2017 · 2 comments

Comments

@Ancoron84
Copy link

Traceback (most recent call last):
File "json2csv.py", line 155, in
loader.write_csv(filename=outfile, make_strings=args.strings)
File "json2csv.py", line 105, in write_csv
writer.writerows(out)
File "/usr/lib64/python2.7/csv.py", line 158, in writerows
return self.writer.writerows(rows)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0131' in position 2: ordinal not in range(128)

@Ancoron84
Copy link
Author

@evidens i have also a solution for this problem. I would like to commit my solution to a separate branch but i don't have the permission.

@evidens
Copy link
Owner

evidens commented Dec 17, 2017

Hello, thanks for your interest in helping. Usually what people do on Github is fork a repository, apply the fixes to that form and submit a pull request https://gist.github.com/Chaser324/ce0505fbed06b947d962. That allows a maintainer to review the code and suggest improvements.

Did you install unicodecsv as specified in the instructions? I've used this library with unicode data before and it generally works as long as you install that package and your input file is UTF-8.

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

2 participants