Skip to content

Open output files after forking#238

Open
prokotg wants to merge 2 commits into
WikiExtractor:masterfrom
prokotg:master
Open

Open output files after forking#238
prokotg wants to merge 2 commits into
WikiExtractor:masterfrom
prokotg:master

Conversation

@prokotg

@prokotg prokotg commented Dec 15, 2020

Copy link
Copy Markdown

Fixes #233 Opening output files before forking makes the script crash on Windows . I did not test the influence of this PR on other systems and python versions.

@attardi

attardi commented Dec 16, 2020

Copy link
Copy Markdown
Collaborator

Watch out: the second argument to reduce_process() might be sys.stdout and not an OutputSplitter.

if out_file == '-':
    output = sys.stdout

Then it won't have method open_file(), that you call in reduce+process().

@prokotg

prokotg commented Dec 16, 2020

Copy link
Copy Markdown
Author

fixed

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.

TypeError: cannot pickle '_io.TextIOWrapper' object

3 participants