ipython / ipython/ipykernel

Tk event loop not working on Windows

Open
#358 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
734
Forks
412
Avg merge
1d 5h
Merged PRs (30d)
8

Description

Hi,

There seems to be a problem with the event loop magic for Tk on Windows.
Executing `%gui tk` in the kernel results in:
```
ERROR:tornado.application:Exception in callback functools.partial(.null_wrapper at 0x000000000
Traceback (most recent call last):
File "c:\program files\python37\lib\site-packages\tornado\ioloop.py", line 758, in _run_callback
ret = callback()
File "c:\program files\python37\lib\site-packages\tornado\stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "c:\program files\python37\lib\site-packages\ipykernel\kernelbase.py", line 295, in advance_eventloop
eventloop(self)
File "c:\program files\python37\lib\site-packages\ipykernel\eventloops.py", line 246, in loop_tk
app.tk.createfilehandler(stream.getsockopt(zmq.FD), READABLE, notifier)
AttributeError: '_tkinter.tkapp' object has no attribute 'createfilehandler'
```
Tested with
- Windows 7 x64
- Python 3.7.0 x64
- ipykernel 5.0.0

ipykernel 4.10 works fine. Also commenting out line 246 in eventloops.py seems to work.

Best,
Matthias

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.