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

pandas.read_csv sometimes fails with default utf-8 encoding #83

Closed
blakerosenthal opened this issue Sep 12, 2019 · 0 comments · Fixed by #84
Closed

pandas.read_csv sometimes fails with default utf-8 encoding #83

blakerosenthal opened this issue Sep 12, 2019 · 0 comments · Fixed by #84

Comments

@blakerosenthal
Copy link
Contributor

PopulationSim's input_pre_processor sometimes fails to read CSV files with certain Windows encodings using the default utf-8 decoder.

INFO - Reading csv file data\seed_households.csv
Traceback (most recent call last):
  File "pandas\_libs\parsers.pyx", line 1151, in pandas._libs.parsers.TextReader
._convert_tokens
  File "pandas\_libs\parsers.pyx", line 1281, in pandas._libs.parsers.TextReader
._convert_with_dtype
  File "pandas\_libs\parsers.pyx", line 1297, in pandas._libs.parsers.TextReader
._string_convert
  File "pandas\_libs\parsers.pyx", line 1520, in pandas._libs.parsers._string_bo
x_utf8
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 8: invalid
start byte
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

Successfully merging a pull request may close this issue.

1 participant