Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

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

Merged
Timoeller merged 4 commits intodeepset-ai:masterfrom
lingsond:master
Jul 27, 2020
Merged

farm.data_handler.utils: Add encoding to open write in split_file method#466
Timoeller merged 4 commits intodeepset-ai:masterfrom
lingsond:master

Conversation

@lingsond
Copy link
Copy Markdown
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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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