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

farm.data_handler.utils: Add encoding to open write in split_file method #466

Merged
merged 4 commits into from
Jul 27, 2020

Conversation

lingsond
Copy link
Contributor

@lingsond lingsond commented Jul 17, 2020

In FARM version, the encoding is only used during open read in the method split_file, but not when open file for write at line 784 and 793. This caused an error when splitting a file with UTF-8 encoding, which shouldn't happen considering the method itself required an encoding as input parameter (which is default to UTF-8).

I've tested this revision with my text file (which caused error before the revision), and the split process works fine afterwards.

Fixes #462

Copy link
Contributor

@Timoeller Timoeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good.

@Timoeller Timoeller merged commit 0d1eab3 into deepset-ai:master Jul 27, 2020
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 this pull request may close these issues.

farm.data_handler.split_file encoding error
2 participants