Advertisement
Guest User

ipython crash report

a guest
Aug 22nd, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.02 KB | None | 0 0
  1. ***************************************************************************
  2.  
  3. IPython post-mortem report
  4.  
  5. {'commit_hash': '<not found>',
  6. 'commit_source': '(none found)',
  7. 'ipython_path': '/usr/local/lib/python2.6/dist-packages/IPython',
  8. 'ipython_version': '0.11',
  9. 'os_name': 'posix',
  10. 'platform': 'Linux-2.6.31-23-generic-i686-with-Ubuntu-9.10-karmic',
  11. 'sys_executable': '/usr/bin/python',
  12. 'sys_platform': 'linux2',
  13. 'sys_version': '2.6.4 (r264:75706, Dec 7 2009, 18:45:15) \n[GCC 4.4.1]'}
  14.  
  15. ***************************************************************************
  16.  
  17.  
  18.  
  19. ***************************************************************************
  20.  
  21. Crash traceback:
  22.  
  23. ---------------------------------------------------------------------------
  24. SyntaxError Python 2.6.4: /usr/bin/python
  25. Mon Aug 22 15:06:57 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/bin/ipython in <module>()
  29. 1 #!/usr/bin/python
  30. 2 # EASY-INSTALL-ENTRY-SCRIPT: 'ipython==0.11','console_scripts','ipython'
  31. 3 __requires__ = 'ipython==0.11'
  32. 4 import sys
  33. 5 from pkg_resources import load_entry_point
  34. 6
  35. 7 if __name__ == '__main__':
  36. 8 sys.exit(
  37. ----> 9 load_entry_point('ipython==0.11', 'console_scripts', 'ipython')()
  38. global load_entry_point = <function load_entry_point at 0xb77995dc>
  39. 10 )
  40.  
  41. /usr/local/lib/python2.6/dist-packages/IPython/frontend/terminal/ipapp.pyc in launch_new_instance()
  42. 355 ipython_dir = get_ipython_dir()
  43. 356 profile_dir = os.path.join(ipython_dir, 'profile_default')
  44. 357 cl = PyFileConfigLoader(default_config_file_name, profile_dir)
  45. 358 try:
  46. 359 config = cl.load_config()
  47. 360 except IOError:
  48. 361 # no config found
  49. 362 config = Config()
  50. 363 return config
  51. 364
  52. 365
  53. 366 def launch_new_instance():
  54. 367 """Create and run a full blown IPython instance"""
  55. 368 app = TerminalIPythonApp.instance()
  56. 369 app.initialize()
  57. --> 370 app.start()
  58. 371
  59. 372
  60. 373 if __name__ == '__main__':
  61. 374 launch_new_instance()
  62.  
  63. /usr/local/lib/python2.6/dist-packages/IPython/frontend/terminal/ipapp.pyc in start(self=<IPython.frontend.terminal.ipapp.TerminalIPythonApp object at 0xb77ad24c>)
  64. 329 if gui or self.pylab:
  65. 330 try:
  66. 331 self.log.info("Enabling GUI event loop integration, "
  67. 332 "toolkit=%s, pylab=%s" % (gui, self.pylab) )
  68. 333 activate(gui)
  69. 334 except:
  70. 335 self.log.warn("Error in enabling GUI event loop integration:")
  71. 336 self.shell.showtraceback()
  72. 337
  73. 338 def start(self):
  74. 339 if self.subapp is not None:
  75. 340 return self.subapp.start()
  76. 341 # perform any prexec steps:
  77. 342 if self.interact:
  78. 343 self.log.debug("Starting IPython's mainloop...")
  79. --> 344 self.shell.mainloop()
  80. 345 else:
  81. 346 self.log.debug("IPython not interactive...")
  82. 347
  83. 348
  84. 349 def load_default_config(ipython_dir=None):
  85. 350 """Load the default config file from the default ipython_dir.
  86. 351
  87. 352 This is useful for embedded shells.
  88. 353 """
  89. 354 if ipython_dir is None:
  90. 355 ipython_dir = get_ipython_dir()
  91. 356 profile_dir = os.path.join(ipython_dir, 'profile_default')
  92. 357 cl = PyFileConfigLoader(default_config_file_name, profile_dir)
  93. 358 try:
  94. 359 config = cl.load_config()
  95.  
  96. /usr/local/lib/python2.6/dist-packages/IPython/frontend/terminal/interactiveshell.pyc in mainloop(self=<IPython.frontend.terminal.interactiveshell.TerminalInteractiveShell object at 0xa0283ec>, display_banner=None)
  97. 207 #-------------------------------------------------------------------------
  98. 208 # Mainloop and code execution logic
  99. 209 #-------------------------------------------------------------------------
  100. 210
  101. 211 def mainloop(self, display_banner=None):
  102. 212 """Start the mainloop.
  103. 213
  104. 214 If an optional banner argument is given, it will override the
  105. 215 internally created default banner.
  106. 216 """
  107. 217
  108. 218 with nested(self.builtin_trap, self.display_trap):
  109. 219
  110. 220 while 1:
  111. 221 try:
  112. --> 222 self.interact(display_banner=display_banner)
  113. global c = undefined
  114. global C = undefined
  115. global s = undefined
  116. global i = undefined
  117. global d = undefined
  118. global o = undefined
  119. global S = undefined
  120. global pN = undefined
  121. 223 #self.interact_with_readline()
  122. 224 # XXX for testing of a readline-decoupled repl loop, call
  123. 225 # interact_with_readline above
  124. 226 break
  125. 227 except KeyboardInterrupt:
  126. 228 # this should not be necessary, but KeyboardInterrupt
  127. 229 # handling seems rather unpredictable...
  128. 230 self.write("\nKeyboardInterrupt in interact()\n")
  129. 231
  130. 232 def interact(self, display_banner=None):
  131. 233 """Closely emulate the interactive Python console."""
  132. 234
  133. 235 # batch run -> do not interact
  134. 236 if self.exit_now:
  135. 237 return
  136.  
  137. /usr/local/lib/python2.6/dist-packages/IPython/frontend/terminal/interactiveshell.pyc in interact(self=<IPython.frontend.terminal.interactiveshell.TerminalInteractiveShell object at 0xa0283ec>, display_banner=False)
  138. 297 'Because of how pdb handles the stack, it is impossible\n'
  139. 298 'for IPython to properly format this particular exception.\n'
  140. 299 'IPython will resume normal operation.')
  141. 300 except:
  142. 301 # exceptions here are VERY RARE, but they can be triggered
  143. 302 # asynchronously by signal handlers, for example.
  144. 303 self.showtraceback()
  145. 304 else:
  146. 305 self.input_splitter.push(line)
  147. 306 more = self.input_splitter.push_accepts_more()
  148. 307 if (self.SyntaxTB.last_syntax_error and
  149. 308 self.autoedit_syntax):
  150. 309 self.edit_syntax_error()
  151. 310 if not more:
  152. 311 source_raw = self.input_splitter.source_raw_reset()[1]
  153. --> 312 self.run_cell(source_raw)
  154. 313
  155. 314 # We are off again...
  156. 315 __builtin__.__dict__['__IPYTHON__active'] -= 1
  157. 316
  158. 317 # Turn off the exit flag, so the mainloop can be restarted if desired
  159. 318 self.exit_now = False
  160. 319
  161. 320 def raw_input(self, prompt=''):
  162. 321 """Write a prompt and read a line.
  163. 322
  164. 323 The returned line does not include the trailing newline.
  165. 324 When the user enters the EOF key sequence, EOFError is raised.
  166. 325
  167. 326 Optional inputs:
  168. 327
  169.  
  170. /usr/local/lib/python2.6/dist-packages/IPython/core/interactiveshell.pyc in run_cell(self=<IPython.frontend.terminal.interactiveshell.TerminalInteractiveShell object at 0xa0283ec>, raw_cell=u'from __future__ import braces\n', store_history=True)
  171. 2282
  172. 2283 with self.display_trap:
  173. 2284 try:
  174. 2285 code_ast = ast.parse(cell, filename=cell_name)
  175. 2286 except IndentationError:
  176. 2287 self.showindentationerror()
  177. 2288 self.execution_count += 1
  178. 2289 return None
  179. 2290 except (OverflowError, SyntaxError, ValueError, TypeError,
  180. 2291 MemoryError):
  181. 2292 self.showsyntaxerror()
  182. 2293 self.execution_count += 1
  183. 2294 return None
  184. 2295
  185. 2296 self.run_ast_nodes(code_ast.body, cell_name,
  186. -> 2297 interactivity="last_expr")
  187. 2298
  188. 2299 # Execute any registered post-execution functions.
  189. 2300 for func, status in self._post_execute.iteritems():
  190. 2301 if not status:
  191. 2302 continue
  192. 2303 try:
  193. 2304 func()
  194. 2305 except:
  195. 2306 self.showtraceback()
  196. 2307 # Deactivate failing function
  197. 2308 self._post_execute[func] = False
  198. 2309
  199. 2310 if store_history:
  200. 2311 # Write output to the database. Does nothing unless
  201. 2312 # history output logging is enabled.
  202.  
  203. /usr/local/lib/python2.6/dist-packages/IPython/core/interactiveshell.pyc in run_ast_nodes(self=<IPython.frontend.terminal.interactiveshell.TerminalInteractiveShell object at 0xa0283ec>, nodelist=[<_ast.ImportFrom object at 0xa0f2dcc>], cell_name='<ipython-input-1-2aebb3fc8ecf>', interactivity='none')
  204. 2342 interactivity = "none"
  205. 2343
  206. 2344 if interactivity == 'none':
  207. 2345 to_run_exec, to_run_interactive = nodelist, []
  208. 2346 elif interactivity == 'last':
  209. 2347 to_run_exec, to_run_interactive = nodelist[:-1], nodelist[-1:]
  210. 2348 elif interactivity == 'all':
  211. 2349 to_run_exec, to_run_interactive = [], nodelist
  212. 2350 else:
  213. 2351 raise ValueError("Interactivity was %r" % interactivity)
  214. 2352
  215. 2353 exec_count = self.execution_count
  216. 2354
  217. 2355 for i, node in enumerate(to_run_exec):
  218. 2356 mod = ast.Module([node])
  219. -> 2357 code = self.compile(mod, cell_name, "exec")
  220. 2358 if self.run_code(code):
  221. 2359 return True
  222. 2360
  223. 2361 for i, node in enumerate(to_run_interactive):
  224. 2362 mod = ast.Interactive([node])
  225. 2363 code = self.compile(mod, cell_name, "single")
  226. 2364 if self.run_code(code):
  227. 2365 return True
  228. 2366
  229. 2367 return False
  230. 2368
  231. 2369 def run_code(self, code_obj):
  232. 2370 """Execute a code object.
  233. 2371
  234. 2372 When an exception occurs, self.showtraceback() is called to display a
  235.  
  236. /usr/lib/python2.6/codeop.pyc in __call__(self=<IPython.core.compilerop.CachingCompiler instance at 0xa028cac>, source=<_ast.Module object at 0xa0f2e6c>, filename='<ipython-input-1-2aebb3fc8ecf>', symbol='exec')
  237. 118 - Raise SyntaxError, ValueError or OverflowError if the command is a
  238. 119 syntax error (OverflowError and ValueError can be produced by
  239. 120 malformed literals).
  240. 121 """
  241. 122 return _maybe_compile(_compile, source, filename, symbol)
  242. 123
  243. 124 class Compile:
  244. 125 """Instances of this class behave much like the built-in compile
  245. 126 function, but if one is used to compile text containing a future
  246. 127 statement, it "remembers" and compiles all subsequent program texts
  247. 128 with the statement in force."""
  248. 129 def __init__(self):
  249. 130 self.flags = PyCF_DONT_IMPLY_DEDENT
  250. 131
  251. 132 def __call__(self, source, filename, symbol):
  252. --> 133 codeob = compile(source, filename, symbol, self.flags, 1)
  253. 134 for feature in _features:
  254. 135 if codeob.co_flags & feature.compiler_flag:
  255. 136 self.flags |= feature.compiler_flag
  256. 137 return codeob
  257. 138
  258. 139 class CommandCompiler:
  259. 140 """Instances of this class have __call__ methods identical in
  260. 141 signature to compile_command; the difference is that if the
  261. 142 instance compiles program text containing a __future__ statement,
  262. 143 the instance 'remembers' and compiles all subsequent program texts
  263. 144 with the statement in force."""
  264. 145
  265. 146 def __init__(self,):
  266. 147 self.compiler = Compile()
  267. 148
  268.  
  269. SyntaxError: not a chance (<ipython-input-1-2aebb3fc8ecf>, line 1)
  270.  
  271. ***************************************************************************
  272.  
  273. History of session input:from __future__ import braces
  274. *** Last line of input (may not be in above history):
  275. from __future__ import braces
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement