flexx
flexx copied to clipboard
Compatibility with Jupyter Notebook is broken
Here is my code:
from flexx import flx
flx.init_notebook()
%gui asyncio
Here is the output:
[I 18:20:42 flexx.app] Asset store collected 2 new modules.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-c5872d64e577> in <module>
1 from flexx import flx
----> 2 flx.init_notebook()
3 get_ipython().run_line_magic('gui', 'asyncio')
~\Anaconda3\lib\site-packages\flexx\app\_funcs.py in init_notebook()
169
170 # Install helper to make things work in exported notebooks
--> 171 NoteBookHelper(session)
172
173 proto = 'wss' if server.protocol == 'https' else 'ws'
~\Anaconda3\lib\site-packages\flexx\app\_funcs.py in __init__(self, session)
85 self._real_ws = None
86 self._commands = []
---> 87 self.enable()
88
89 def enable(self):
~\Anaconda3\lib\site-packages\flexx\app\_funcs.py in enable(self)
90 get_ipython = None
91 exec("from IPython import get_ipython") # noqa - dont trigger e.g. PyInstaller
---> 92 ip = get_ipython()
93 ip.events.register('pre_execute', self.capture)
94 ip.events.register('post_execute', self.release)
TypeError: 'NoneType' object is not callable
I think the API changed
Thanks for reporting this. If anyone knows what change is needed, a PR is welcome.