Skip to content

infinite loop  #11026

@kmike

Description

@kmike

When I try to execute this code: https://gist.github.com/kmike/91ef29a3fd2b94ff8b47a5a9ebfa7be2 in an IPython cell (both terminal and notebook), IPython goes to an infinite loop. Code just defines a nested dict; there are unicode symbols. Here is the traceback on interruption:

ERROR:tornado.general:Uncaught exception in ZMQStream callback
Traceback (most recent call last):
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 432, in _run_callback
    callback(*args, **kwargs)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
    return self.dispatch_shell(stream, msg)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell
    handler(stream, idents, msg)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 399, in execute_request
    user_expressions, allow_stdin)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 208, in do_execute
    res = shell.run_cell(code, store_history=store_history, silent=silent)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 537, in run_cell
    return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2654, in run_cell
    cell = self.input_transformer_manager.transform_cell(raw_cell)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/IPython/core/inputsplitter.py", line 659, in transform_cell
    self.push(cell)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/IPython/core/inputsplitter.py", line 702, in push
    out = self.push_line(line)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/IPython/core/inputsplitter.py", line 729, in push_line
    line = self.assemble_python_lines.push(line)
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/IPython/core/inputtransformer.py", line 138, in push
    for intok in self.tokenizer:
  File "/Users/kmike/envs/deep-deep/lib/python3.6/site-packages/IPython/utils/tokenize2.py", line 508, in _tokenize
    pseudomatch = pseudoprog.match(line, pos)
KeyboardInterrupt

I have latest ipython[notebook] installed, with all dependencies upgraded as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions