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

Open output files after forking #238

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

prokotg
Copy link

@prokotg prokotg commented Dec 15, 2020

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
Copy link
Owner

attardi commented Dec 16, 2020

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
Copy link
Author

prokotg commented Dec 16, 2020

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