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

KeyboardInterrupt not producing a failed request #845

Open
davidbrochart opened this issue Jan 17, 2022 · 0 comments
Open

KeyboardInterrupt not producing a failed request #845

davidbrochart opened this issue Jan 17, 2022 · 0 comments

Comments

@davidbrochart
Copy link
Collaborator

One test in nbclient fails randomly while executing a cell with:

while True:
    pass

And interrupting the execution.
Instead of having the following output:

 [{
  'ename': 'KeyboardInterrupt',
  'evalue': '',
  'output_type': 'error',
  'traceback': ['---------------------------------------------------------------------------',\n                'KeyboardInterrupt                         Traceback (most '\n                'recent call last)',\n                '<IPY-INPUT> in <module>\n----> 1 while True: continue\n',\n                'KeyboardInterrupt: ']
  }]

We sometimes get:

[{
  'name': 'stderr', 
  'output_type': 'stream',
  'text': '\nKeyboardInterrupt\n\n'
}]

Which means the interrupt is not treated as an error in the sense of a failed request. Instead, the KeyboardInterrupt is just streamed on stderr.
I'm not sure it comes from ipykernel, and I cannot reproduce locally. Any idea what could be the cause of this behavior?

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