-
Notifications
You must be signed in to change notification settings - Fork 605
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 tests fail with Python 2 #596
Comments
Seems to do with this commit wireservice/agate@6fea5a0. It added this bit to agate Table initialization:
I don't know much about that commit and issue but @onyxfish will know more. |
So I think the issue is that agate's from_csv now expects that a file has been read with proper encoding if passing a file-like object. But the encoding argument isn't used to open the file in _open_input_file if in Python 2. I may be wrong, does that seem like the issue @jpmckinney? |
These tests seem to pass if I give from_csv the path argument instead of the LazyFile object (and let agate figure out encoding). Would that solution affect performance? Not sure if a LazyFile helps performance when using from_csv. |
@nbedi Can you create a patch? I'm not sure what it looks like based only on your description. |
|
I have trouble getting tests right from the repository freshly cloned from master.
Some "unicode tests" won't pass with Python 2 (UnicodeDecodeError). Those are test_ndjson for csvjson, test_unicode for csvlook, test_sort_date for csvsort, and test_sort_string_reverse for csvsort.
Sample output:
Is it something on my side only?
The text was updated successfully, but these errors were encountered: