Created
June 22, 2011 19:26
-
-
Save jstenar/1040920 to your computer and use it in GitHub Desktop.
Traceback for ipython Issue #535
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] | |
Type "copyright", "credits" or "license" for more information. | |
IPython 0.11.dev -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. | |
%guiref -> A brief reference about the graphical user interface. | |
In [1]: %run run_qtcons_bug.py | |
--------------------------------------------------------------------------- | |
UnicodeDecodeError Traceback (most recent call last) | |
C:\python\external\ipy-bugs\<ipython-input-1-24939407fffc> in <module>() | |
----> 1 get_ipython().magic(u"run run_qtcons_bug.py") | |
c:\python\external\ipython\IPython\core\interactiveshell.pyc in magic(self, arg_s) | |
1875 self._magic_locals = sys._getframe(1).f_locals | |
1876 with self.builtin_trap: | |
-> 1877 result = fn(magic_args) | |
1878 # Ensure we're not keeping object references around: | |
1879 self._magic_locals = {} | |
c:\python\external\ipython\IPython\core\magic.pyc in magic_run(self, parameter_s, runner, file_finder) | |
1712 else: | |
1713 # regular execution | |
-> 1714 runner(filename,prog_ns,prog_ns,exit_ignore=exit_ignore) | |
1715 | |
1716 if opts.has_key('i'): | |
c:\python\external\ipython\IPython\core\interactiveshell.pyc in safe_execfile(self, fname, *where, **kw) | |
2184 self.showtraceback(exception_only=True) | |
2185 except: | |
-> 2186 self.showtraceback() | |
2187 | |
2188 def safe_execfile_ipy(self, fname): | |
c:\python\external\ipython\IPython\core\interactiveshell.pyc in showtraceback(self, exc_tuple, filename, tb_offset, exception_only) | |
1560 | |
1561 # Actually show the traceback | |
-> 1562 self._showtraceback(etype, value, stb) | |
1563 | |
1564 except KeyboardInterrupt: | |
c:\python\external\ipython\IPython\zmq\zmqshell.pyc in _showtraceback(self, etype, evalue, stb) | |
134 # Send exception info over pub socket for other clients than the caller | |
135 # to pick up | |
--> 136 exc_msg = dh.session.send(dh.pub_socket, u'pyerr', exc_content, dh.parent_header) | |
137 | |
138 # FIXME - Hack: store exception info in shell object. Right now, the | |
c:\python\external\ipython\IPython\zmq\session.pyc in send(self, stream, msg_or_type, content, parent, ident, buffers, subheader, track) | |
465 | |
466 buffers = [] if buffers is None else buffers | |
--> 467 to_send = self.serialize(msg, ident) | |
468 flag = 0 | |
469 if buffers: | |
c:\python\external\ipython\IPython\zmq\session.pyc in serialize(self, msg, ident) | |
383 content = self.none | |
384 elif isinstance(content, dict): | |
--> 385 content = self.pack(content) | |
386 elif isinstance(content, bytes): | |
387 # content is already packed, as in a relayed message | |
c:\python\external\ipython\IPython\zmq\session.pyc in <lambda>(obj) | |
72 #----------------------------------------------------------------------------- | |
73 key = 'on_unknown' if jsonapi.jsonmod.__name__ == 'jsonlib' else 'default' | |
---> 74 json_packer = lambda obj: jsonapi.dumps(obj, **{key:date_default}) | |
75 json_unpacker = lambda s: extract_dates(jsonapi.loads(s)) | |
76 | |
c:\python26\lib\site-packages\zmq\utils\jsonapi.pyc in dumps(o, **kwargs) | |
72 """%jsonmod | |
73 | |
---> 74 return _squash_unicode(jsonmod.dumps(o, separators=(',',':'),**kwargs)) | |
75 | |
76 def loads(s,**kwargs): | |
c:\python26\lib\json\__init__.pyc in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, encoding, default, **kw) | |
235 check_circular=check_circular, allow_nan=allow_nan, indent=indent, | |
236 separators=separators, encoding=encoding, default=default, | |
--> 237 **kw).encode(obj) | |
238 | |
239 | |
c:\python26\lib\json\encoder.pyc in encode(self, o) | |
365 # exceptions aren't as detailed. The list call should be roughly | |
366 # equivalent to the PySequence_Fast that ''.join() would do. | |
--> 367 chunks = list(self.iterencode(o)) | |
368 return ''.join(chunks) | |
369 | |
c:\python26\lib\json\encoder.pyc in _iterencode(self, o, markers) | |
307 yield chunk | |
308 elif isinstance(o, dict): | |
--> 309 for chunk in self._iterencode_dict(o, markers): | |
310 yield chunk | |
311 else: | |
c:\python26\lib\json\encoder.pyc in _iterencode_dict(self, dct, markers) | |
273 yield encoder(key) | |
274 yield key_separator | |
--> 275 for chunk in self._iterencode(value, markers): | |
276 yield chunk | |
277 if newline_indent is not None: | |
c:\python26\lib\json\encoder.pyc in _iterencode(self, o, markers) | |
304 yield floatstr(o, self.allow_nan) | |
305 elif isinstance(o, (list, tuple)): | |
--> 306 for chunk in self._iterencode_list(o, markers): | |
307 yield chunk | |
308 elif isinstance(o, dict): | |
c:\python26\lib\json\encoder.pyc in _iterencode_list(self, lst, markers) | |
202 else: | |
203 yield separator | |
--> 204 for chunk in self._iterencode(value, markers): | |
205 yield chunk | |
206 if newline_indent is not None: | |
c:\python26\lib\json\encoder.pyc in _iterencode(self, o, markers) | |
292 and not (_encoding == 'utf-8')): | |
293 o = o.decode(_encoding) | |
--> 294 yield encoder(o) | |
295 elif o is None: | |
296 yield 'null' | |
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe5 in position 292: invalid continuation byte |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment