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
Improve error message for %logstop #832
Comments
Hello! By taking a peek in the current code (commit 088eb7d), it can solved by (in IPython/core/logger.py) :
and the diff
I'm not familiar with git yet, so either you commit this directly, or you wait I read http://progit.org/book/ ;) |
Thanks, Bernard. I think we should also display a brief error message when it's called from a magic command. That's best added to https://github.com/ipython/ipython/blob/master/IPython/core/magic.py#L1194 A brief rundown of using github: Click the fork button to copy the repo to your own account. Then on your computer: git clone https://github.com/bernardpaulus/ipython.git cd ipython git checkout -b logstop-error # last bit is the branch name # Change files as desired git commit -a git push origin logstop-error Finally, back on github, find the branch you changed, and click the 'Pull request' button to submit the changes. We've got a more detailed explanation of the workflow in the docs: http://ipython.org/ipython-doc/stable/development/gitwash/index.html |
fixed in #834 I however put the print statement in logger.py since other functions inside it behave like that (switch_log() for instance https://github.com/ipython/ipython/blob/master/IPython/core/logger.py#L127 ) Thanks for your explanations! |
Thanks - closing this issue. |
If
%logstop
is called when logging is not active, it throws a traceback with a fairly unhelpfulAttributeError: 'NoneType' object has no attribute 'close'
. We should catch this error and display a one-line message like "Logging hadn't been started."The text was updated successfully, but these errors were encountered: