8000 Error on IPython 3 notebooks `TypeError: data must be a dict, got: u'IPython.core.displaypub.publish_html'` · Issue #7 · eloraburns/ipython_nose · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Error on IPython 3 notebooks TypeError: data must be a dict, got: u'IPython.core.displaypub.publish_html' #7

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

Open
djvita opened this issue Apr 10, 2015 · 1 comment

Comments

@djvita
Copy link
djvita commented Apr 10, 2015

TypeError Traceback (most recent call last)
in ()
----> 1 get_ipython().magic(u'nose')

/usr/local/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2302 magic_name, _, magic_arg_s = arg_s.partition(' ')
2303 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2304 return self.run_line_magic(magic_name, magic_arg_s)
2305
2306 #-------------------------------------------------------------------------

/usr/local/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2223 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2224 with self.builtin_trap:
-> 2225 result = fn(args,*kwargs)
2226 return result
2227

/resources/ipython_nose.pyc in nose(line, test_module)
402
403 nose_core.TestProgram(
--> 404 argv=argv, suite=tests, addplugins=[plug], exit=False, config=config)
405
406 return plug

/home/notebook/djvita/lib/python2.7/site-packages/nose/core.pyc in init(self, module, defaultTest, argv, testRunner, testLoader, env, config, suite, exit, plugins, addplugins)
119 self, module=module, defaultTest=defaultTest,
120 argv=argv, testRunner=testRunner, testLoader=testLoader,
--> 121 **extra_args)
122
123 def getAllConfigFiles(self, env=None):

/usr/lib/python2.7/unittest/main.pyc in init(self, module, defaultTest, argv, testRunner, testLoader, exit, verbosity, failfast, catchbreak, buffer)
92 self.testLoader = testLoader
93 self.progName = os.path.basename(argv[0])
---> 94 self.parseArgs(argv)
95 self.runTests()
96

/home/notebook/djvita/lib/python2.7/site-packages/nose/core.pyc in parseArgs(self, argv)
143 """Parse argv and env and configure running environment.
144 """
--> 145 self.config.configure(argv, doc=self.usage())
146 log.debug("configured %s", self.config)
147

/home/notebook/djvita/lib/python2.7/site-packages/nose/config.pyc in configure(self, argv, doc)
345 if not options.showPlugins:
346 self.plugins.configure(options, self)
--> 347 self.plugins.begin()
348
349 def configureLogging(self):

/home/notebook/djvita/lib/python2.7/site-packages/nose/plugins/manager.pyc in call(self, _arg, *_kw)
97
98 def call(self, _arg, *_kw):
---> 99 return self.call(_arg, *_kw)
100
101 def addPlugin(self, plugin, call):

/home/notebook/djvita/lib/python2.7/site-packages/nose/plugins/manager.pyc in simple(self, _arg, *_kw)
165 """
166 for p, meth in self.plugins:
--> 167 result = meth(_arg, *_kw)
168 if result is not None:
169 return result

/resources/ipython_nose.pyc in begin(self)
310 from IPython.zmq.displayhook import ZMQShellDisplayHook
311 if isinstance(sys.displayhook, ZMQShellDisplayHook):
--> 312 self.live_output = NotebookLiveOutput()
313 else:
314 self.live_output = ConsoleLiveOutput(self)

/resources/ipython_nose.pyc in init(self)
48 displaypub.publish_display_data(
49 u'IPython.core.displaypub.publish_html',
---> 50 {'text/html':'

' % self.output_id})
51 displaypub.publish_display_data(
52 u'IPython.core.displaypub.publish_javascript',

/usr/local/lib/python2.7/dist-packages/IPython/core/display.pyc in publish_display_data(data, metadata, source)
114 InteractiveShell.instance().display_pub.publish(
115 data=data,
--> 116 metadata=metadata,
117 )
118

/usr/local/lib/python2.7/dist-packages/IPython/kernel/zmq/zmqshell.pyc in publish(self, data, metadata, source)
77 if metadata is None:
78 metadata = {}
---> 79 self._validate_data(data, metadata)
80 content = {}
81 content['data'] = encode_images(data)

/usr/local/lib/python2.7/dist-packages/IPython/core/displaypub.pyc in _validate_data(self, data, metadata)
48
49 if not isinstance(data, dict):
---> 50 raise TypeError('data must be a dict, got: %r' % data)
51 if metadata is not None:
52 if not isinstance(metadata, dict):

TypeError: data must be a dict, got: u'IPython.core.displaypub.publish_html'

IPython 2 worked fine. I'm on 3.0.0-f75fda4 and is running on: Python 2.7.6

@djvita
Copy link
Author
djvita commented Apr 17, 2015

Basically the json structure of the notebook changed. Still no idea how to fix it.

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
0