Advertisement
Guest User

Untitled

a guest
Aug 13th, 2011
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.37 KB | None | 0 0
  1. ***************************************************************************
  2.  
  3. IPython post-mortem report
  4.  
  5. {'commit_hash': '464280a',
  6. 'commit_source': 'installation',
  7. 'ipython_path': '/usr/local/lib/python2.6/dist-packages/ipython-0.11-py2.6.egg/IPython',
  8. 'ipython_version': '0.11',
  9. 'os_name': 'posix',
  10. 'platform': 'Linux-2.6.32-33-generic-i686-with-Ubuntu-10.04-lucid',
  11. 'sys_executable': '/usr/bin/python',
  12. 'sys_platform': 'linux2',
  13. 'sys_version': '2.6.5 (r265:79063, Apr 16 2010, 13:09:56) \n[GCC 4.4.3]'}
  14.  
  15. ***************************************************************************
  16.  
  17.  
  18.  
  19. ***************************************************************************
  20.  
  21. Crash traceback:
  22.  
  23. ---------------------------------------------------------------------------
  24. TypeError Python 2.6.5: /usr/bin/python
  25. Mon Aug 8 12:58:21 2011
  26. A problem occured executing Python code. Here is the sequence of function
  27. calls leading up to the error, with the most recent (innermost) call last.
  28. /usr/local/lib/python2.6/dist-packages/ipython-0.11-py2.6.egg/IPython/frontend/qt/base_frontend_mixin.pyc in _dispatch(self=<IPython.frontend.qt.console.rich_ipython_widget.RichIPythonWidget object>, msg={'buffers': [], 'content': {'data': {'text/html': [4.5, 2], 'text/plain': '<__main__.HH at 0x9789fcc>'}, 'execution_count': 20}, 'header': {'date': datetime.datetime(2011, 8, 8, 12, 58, 20, 773830), 'msg_id': 'bbc08546-44c3-42fd-940f-44605799885b', 'msg_type': 'pyout', 'session': 'ee3860fa-4dfb-4123-8db0-4bb2f03bf6e3', 'username': 'kernel'}, 'msg_type': 'pyout', 'parent_header': {'date': datetime.datetime(2011, 8, 8, 12, 58, 20, 753494), 'msg_id': '05026e67-abb0-4b42-ac29-4010ed133db2', 'msg_type': 'execute_request', 'session': '980b2da7-7026-4708-90d4-95e215aee5cc', 'username': 'ritz'}})
  29. 87 """ Called when the KernelManager channels have stopped listening or
  30. 88 when a listening KernelManager is removed from the frontend.
  31. 89 """
  32. 90
  33. 91 #---------------------------------------------------------------------------
  34. 92 # 'BaseFrontendMixin' protected interface
  35. 93 #---------------------------------------------------------------------------
  36. 94
  37. 95 def _dispatch(self, msg):
  38. 96 """ Calls the frontend handler associated with the message type of the
  39. 97 given message.
  40. 98 """
  41. 99 msg_type = msg['msg_type']
  42. 100 handler = getattr(self, '_handle_' + msg_type, None)
  43. 101 if handler:
  44. --> 102 handler(msg)
  45. 103
  46. 104 def _is_from_this_session(self, msg):
  47. 105 """ Returns whether a reply from the kernel originated from a request
  48. 106 from this frontend.
  49. 107 """
  50. 108 session = self._kernel_manager.session.session
  51. 109 return msg['parent_header']['session'] == session
  52.  
  53. /usr/local/lib/python2.6/dist-packages/ipython-0.11-py2.6.egg/IPython/frontend/qt/console/rich_ipython_widget.pyc in _handle_pyout(self=<IPython.frontend.qt.console.rich_ipython_widget.RichIPythonWidget object>, msg={'buffers': [], 'content': {'data': {'text/html': [4.5, 2], 'text/plain': '<__main__.HH at 0x9789fcc>'}, 'execution_count': 20}, 'header': {'date': datetime.datetime(2011, 8, 8, 12, 58, 20, 773830), 'msg_id': 'bbc08546-44c3-42fd-940f-44605799885b', 'msg_type': 'pyout', 'session': 'ee3860fa-4dfb-4123-8db0-4bb2f03bf6e3', 'username': 'kernel'}, 'msg_type': 'pyout', 'parent_header': {'date': datetime.datetime(2011, 8, 8, 12, 58, 20, 753494), 'msg_id': '05026e67-abb0-4b42-ac29-4010ed133db2', 'msg_type': 'execute_request', 'session': '980b2da7-7026-4708-90d4-95e215aee5cc', 'username': 'ritz'}})
  54. 75 data = content['data']
  55. 76 if data.has_key('image/svg+xml'):
  56. 77 self._append_plain_text(self.output_sep, True)
  57. 78 self._append_html(self._make_out_prompt(prompt_number), True)
  58. 79 self._append_svg(data['image/svg+xml'], True)
  59. 80 self._append_html(self.output_sep2, True)
  60. 81 elif data.has_key('image/png'):
  61. 82 self._append_plain_text(self.output_sep, True)
  62. 83 self._append_html(self._make_out_prompt(prompt_number), True)
  63. 84 # This helps the output to look nice.
  64. 85 self._append_plain_text('\n', True)
  65. 86 self._append_png(decodestring(data['image/png']), True)
  66. 87 self._append_html(self.output_sep2, True)
  67. 88 else:
  68. 89 # Default back to the plain text representation.
  69. ---> 90 return super(RichIPythonWidget, self)._handle_pyout(msg)
  70. 91
  71. 92 def _handle_display_data(self, msg):
  72. 93 """ Overridden to handle rich data types, like SVG.
  73. 94 """
  74. 95 if not self._hidden and self._is_from_this_session(msg):
  75. 96 source = msg['content']['source']
  76. 97 data = msg['content']['data']
  77. 98 metadata = msg['content']['metadata']
  78. 99 # Try to use the svg or html representations.
  79. 100 # FIXME: Is this the right ordering of things to try?
  80. 101 if data.has_key('image/svg+xml'):
  81. 102 svg = data['image/svg+xml']
  82. 103 self._append_svg(svg, True)
  83. 104 elif data.has_key('image/png'):
  84. 105 # PNG data is base64 encoded as it passes over the network
  85.  
  86. /usr/local/lib/python2.6/dist-packages/ipython-0.11-py2.6.egg/IPython/frontend/qt/console/ipython_widget.pyc in _handle_pyout(self=<IPython.frontend.qt.console.rich_ipython_widget.RichIPythonWidget object>, msg={'buffers': [], 'content': {'data': {'text/html': [4.5, 2], 'text/plain': '<__main__.HH at 0x9789fcc>'}, 'execution_count': 20}, 'header': {'date': datetime.datetime(2011, 8, 8, 12, 58, 20, 773830), 'msg_id': 'bbc08546-44c3-42fd-940f-44605799885b', 'msg_type': 'pyout', 'session': 'ee3860fa-4dfb-4123-8db0-4bb2f03bf6e3', 'username': 'kernel'}, 'msg_type': 'pyout', 'parent_header': {'date': datetime.datetime(2011, 8, 8, 12, 58, 20, 753494), 'msg_id': '05026e67-abb0-4b42-ac29-4010ed133db2', 'msg_type': 'execute_request', 'session': '980b2da7-7026-4708-90d4-95e215aee5cc', 'username': 'ritz'}})
  87. 179 items = [ line.rstrip() for _, _, line in history_items ]
  88. 180 self._set_history(items)
  89. 181
  90. 182 def _handle_pyout(self, msg):
  91. 183 """ Reimplemented for IPython-style "display hook".
  92. 184 """
  93. 185 if not self._hidden and self._is_from_this_session(msg):
  94. 186 content = msg['content']
  95. 187 prompt_number = content['execution_count']
  96. 188 data = content['data']
  97. 189 if data.has_key('text/html'):
  98. 190 self._append_plain_text(self.output_sep, True)
  99. 191 self._append_html(self._make_out_prompt(prompt_number), True)
  100. 192 html = data['text/html']
  101. 193 self._append_plain_text('\n', True)
  102. --> 194 self._append_html(html + self.output_sep2, True)
  103. 195 elif data.has_key('text/plain'):
  104. 196 self._append_plain_text(self.output_sep, True)
  105. 197 self._append_html(self._make_out_prompt(prompt_number), True)
  106. 198 text = data['text/plain']
  107. 199 # If the repr is multiline, make sure we start on a new line,
  108. 200 # so that its lines are aligned.
  109. 201 if "\n" in text and not self.output_sep.endswith("\n"):
  110. 202 self._append_plain_text('\n', True)
  111. 203 self._append_plain_text(text + self.output_sep2, True)
  112. 204
  113. 205 def _handle_display_data(self, msg):
  114. 206 """ The base handler for the ``display_data`` message.
  115. 207 """
  116. 208 # For now, we don't display data from other frontends, but we
  117. 209 # eventually will as this allows all frontends to monitor the display
  118.  
  119. TypeError: can only concatenate list (not "unicode") to list
  120.  
  121. ***************************************************************************
  122.  
  123. History of session input:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement