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

corpus_compare.py double-output #12

Open
jeremydouglass opened this issue Nov 3, 2017 · 1 comment
Open

corpus_compare.py double-output #12

jeremydouglass opened this issue Nov 3, 2017 · 1 comment

Comments

@jeremydouglass
Copy link
Collaborator

In the 2_clean_data notebook, corpus_compare.py is printing output to Jupyter notebooks multiple times if it is re-run in the notebook.

This has to do with setting the parser root handler -- set it and warnings replicate, don't set it and no notebook output at all.

Output appears as an error message in a notebook and interrupts batch flow.
This also interrupts %run in a group notebook.

@jeremydouglass
Copy link
Collaborator Author

I fixed the the double-notebook output by setting root logger to info and logger.propagate = 0

Tried removing all logger handlers at end of script to no effect.

However, although the notebook cell displays content only once....

  1. notebook output is still pink/warning
  2. .log text file is still written to twice

Tried moving all logger console calls from .debug to .info -- notebook output still pink.

in the future, could also try:

%capture [--no-stderr] [--no-stdout] [--no-display] [output]

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

No branches or pull requests

1 participant