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

Crash Ultratraceback/ session history #4361

Closed
Carreau opened this issue Oct 8, 2013 · 3 comments · Fixed by #4372
Closed

Crash Ultratraceback/ session history #4361

Carreau opened this issue Oct 8, 2013 · 3 comments · Fixed by #4372
Assignees
Labels
Milestone

Comments

@Carreau
Copy link
Member

Carreau commented Oct 8, 2013

print("\x")

In Notebook make ultratraceback not behave :

Traceback (most recent call last):

  File "/Users/matthiasbussonnier/ipython/IPython/kernel/zmq/ipkernel.py", line 378, in execute_request
    shell.run_cell(code, store_history=store_history, silent=silent)

  File "/Users/matthiasbussonnier/ipython/IPython/core/interactiveshell.py", line 2676, in run_cell
    self.showsyntaxerror()

  File "/Users/matthiasbussonnier/ipython/IPython/core/interactiveshell.py", line 1774, in showsyntaxerror
    stb = self.SyntaxTB.structured_traceback(etype, value, [])

  File "/Users/matthiasbussonnier/ipython/IPython/core/ultratb.py", line 1205, in structured_traceback
    if isinstance(value.filename, py3compat.string_types) \

AttributeError: 'exceptions.ValueError' object has no attribute 'filename'


ERROR! Session/line number was not unique in database. History logging moved to new session 13867

Of course not hightlighted, kernel does not dies, but no prompt number returned.

(that's not master as I merged a few branch in it, but it shoudln't have any effect, and I can't test on master now)

@ghost ghost assigned takluyver Oct 8, 2013
@takluyver
Copy link
Member

My fault. I assumed that SyntaxTB would only ever be called with a SyntaxError, but it's possible for it to be called with another error, such as a ValueError in this case.

@Carreau
Copy link
Member Author

Carreau commented Oct 8, 2013

Not yours only, went through review (I guess) nobody saw it.

@takluyver
Copy link
Member

See #4372

minrk added a commit that referenced this issue Oct 11, 2013
Don't assume that SyntaxTB is always called with a SyntaxError

closes #4361
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Don't assume that SyntaxTB is always called with a SyntaxError

closes ipython#4361
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants