[IPython-dev] [Fwd: IPython Crash Report]

Jörgen Stenarson jorgen.stenarson at bostream.nu
Wed May 24 13:36:36 EDT 2006


Hi Martin,

I'm not able to reproduce a crash like this when hitting ctrl-c but 
perhaps I'm not running ipython the same way you did. The only thing I 
see is that KeyboardInterupt is printed and I get a new prompt. Is there 
anything else you could say about your configuration, the provided 
traceback doesn't give much to go on.

probably unrelated to your problem:
I have had some problems with ctrl-c when using the eggsetup.py version 
and launching using the ipyhon.exe file in python/scripts. It is however 
not a problem with a traceback. But the problem is that python.exe is 
launched by ipython.exe and when you press ctrl-c ipython.exe gets the 
interrupt and exits but python.exe is still running which leads to some 
really strange behaviour where the ordinary commandprompt is printed 
every other line and the python prompt is printed on the other lines.



/Jörgen

Fernando Perez skrev:
> Hi folks,
> 
> here's a crash report related to the readline component, which some of 
> you know a lot better than I do.
> 
> Cheers,
> 
> f
> 
> -------- Original Message --------
> Subject: IPython Crash Report
> Date: Thu, 27 Apr 2006 17:27:15 -0700
> From: Martin Spacek <mspacek at mm.st>
> To: fperez at colorado.edu
> 
> Here it is. I think all I did was hit Ctrl-C to escape to a new line,
> maybe I mistakenly hit something else.
> 
> Cheers,
> 
> 
> ------------------------------------------------------------------------
> 
> ***************************************************************************
> 
> IPython post-mortem report
> 
> IPython version: 0.7.1.fix1 
> 
> SVN revision   : $Revision: 1112 $ 
> 
> Platform info  : os.name -> nt, sys.platform -> win32
> 
> ***************************************************************************
> 
> Current user configuration structure:
> 
> {'Version': 0,
>  'alias': [],
>  'args': [],
>  'autocall': 1,
>  'autoedit_syntax': 1,
>  'autoindent': 1,
>  'automagic': 1,
>  'banner': 1,
>  'c': '',
>  'cache_size': 1000,
>  'classic': 0,
>  'color_info': 1,
>  'colors': 'Linux',
>  'confirm_exit': 0,
>  'debug': 0,
>  'deep_reload': 0,
>  'editor': 'c:\\bin\\textpad\\textpad.exe',
>  'embedded': False,
>  'execfile': [],
>  'execute': ['ipmagic(r"%logstart -t \'~\\_ipython\\ipython.log\' append")'],
>  'gthread': 0,
>  'help': 0,
>  'ignore': 0,
>  'import_all': ['IPython.Extensions.InterpreterExec'],
>  'import_mod': [],
>  'import_some': [[]],
>  'include': ['ipythonrc'],
>  'ipythondir': 'C:\\home\\mspacek\\_ipython',
>  'log': 0,
>  'logfile': '',
>  'logplay': '',
>  'magic_docstrings': 0,
>  'messages': 1,
>  'multi_line_specials': 1,
>  'nosep': 0,
>  'opts': Struct({'profile': 'pysh', 'logfile': 'C:\\home\\mspacek\\_ipython\\ipython.log'}),
>  'pdb': 0,
>  'pprint': 1,
>  'profile': 'pysh',
>  'prompt_in1': '\\C_LightGreen\\u@\\h\\C_LightBlue[\\C_LightCyan\\Y1\\C_LightBlue]\\C_Green|\\#> ',
>  'prompt_in2': '\\C_Green|\\C_LightGreen\\D\\C_Green> ',
>  'prompt_out': '<\\#> ',
>  'prompts_pad_left': 1,
>  'pylab': 0,
>  'qthread': 0,
>  'quick': 0,
>  'rcfile': 'ipythonrc.ini',
>  'readline': 1,
>  'readline_merge_completions': 1,
>  'readline_omit__names': 0,
>  'readline_parse_and_bind': ['tab: complete',
>                              '"\\C-l": possible-completions',
>                              'set show-all-if-ambiguous on',
>                              '"\\C-o": tab-insert',
>                              '"\\M-i": "    "',
>                              '"\\M-o": "\\d\\d\\d\\d"',
>                              '"\\M-I": "\\d\\d\\d\\d"',
>                              '"\\C-r": reverse-search-history',
>                              '"\\C-s": forward-search-history',
>                              '"\\C-p": history-search-backward',
>                              '"\\C-n": history-search-forward',
>                              '"\\e[A": history-search-backward',
>                              '"\\e[B": history-search-forward',
>                              '"\\C-k": kill-line',
>                              '"\\C-u": unix-line-discard'],
>  'readline_remove_delims': '-/~',
>  'screen_length': -1,
>  'separate_in': '',
>  'separate_out': '',
>  'separate_out2': '',
>  'system_verbose': 0,
>  'tk': 0,
>  'upgrade': 0,
>  'wildcards_case_sensitive': 1,
>  'wthread': 0,
>  'wxversion': '0',
>  'xmode': 'Context'}
> 
> ***************************************************************************
> 
> Crash traceback:
> 
> ---------------------------------------------------------------------------
> exceptions.KeyboardInterrupt                  Python 2.4.3: C:\bin\Python24\python.exe
>                                                    Thu Apr 27 17:23:12 2006
> A problem occured executing Python code.  Here is the sequence of function
> calls leading up to the error, with the most recent (innermost) call last.
> 
> C:\home\mspacek\Desktop\source\callbacks.c in 'calling callback function'()
>     185 
>     186 
>     187 
>     188 
>     189 
>     190 
>     191 
>     192 
>     193 
>     194 
>     195 
>     196 
>     197 
>     198 
>     199 
> --> 200 
>     201 
>     202 
>     203 
>     204 
>     205 
>     206 
>     207 
>     208 
>     209 
>     210 
>     211 
>     212 
>     213 
>     214 
>     215 
> 
> C:\bin\Python24\Lib\site-packages\readline\Console.py in hook_wrapper_23(stdin=2084091112, stdout=2084091144, prompt='\x01\x1b[0;32m\x02\x01\x1b[1;32m\x02 at Godel\x01\x1b[1;34m\x02[\x01\x1b[1;36m\x02Desktop\x01\x1b[1;34m\x02]\x01\x1b[0;32m\x02|\x01\x1b[1;32m\x0236\x01\x1b[0;32m\x02> \x01\x1b[0m\x02')
>     626 
>     627 # I use ctypes to create a C-callable from a Python wrapper that
>     628 # handles the exceptions and gets the result into the right form.
>     629 
>     630 # the type for our C-callable wrapper
>     631 HOOKFUNC22 = CFUNCTYPE(c_char_p, c_char_p)
>     632 HOOKFUNC23 = CFUNCTYPE(c_char_p, c_void_p, c_void_p, c_char_p)
>     633 
>     634 readline_hook = None # the python hook goes here
>     635 readline_ref = None  # this holds a reference to the c-callable to keep it alive
>     636 
>     637 def hook_wrapper_23(stdin, stdout, prompt):
>     638   '''Wrap a Python readline so it behaves like GNU readline.'''
>     639   try:
>     640     # call the Python hook
> --> 641     res = readline_hook(prompt)
>         res = undefined
>         global readline_hook = <bound method Readline.readline of <readline.PyReadline.Readline instance at 0x00C05710>>
>         prompt = '\x01\x1b[0;32m\x02\x01\x1b[1;32m\x02 at Godel\x01\x1b[1;34m\x02[\x01\x1b[1;36m\x02Desktop\x01\x1b[1;34m\x02]\x01\x1b[0;32m\x02|\x01\x1b[1;32m\x0236\x01\x1b[0;32m\x02> \x01\x1b[0m\x02'
>     642     # make sure it returned the right sort of thing
>     643     if res and not isinstance(res, str):
>     644       raise TypeError, 'readline must return a string.'
>     645   except KeyboardInterrupt:
>     646     # GNU readline returns 0 on keyboard interrupt
>     647     return 0
>     648   except EOFError:
>     649     # It returns an empty string on EOF
>     650     res = ''
>     651   except:
>     652     print >>sys.stderr, 'Readline internal error'
>     653     traceback.print_exc()
>     654     res = '\n'
>     655   # we have to make a copy because the caller expects to free the result
>     656   n = len(res)
> 
> KeyboardInterrupt: 
> 
> ***************************************************************************
> 
> History of session input:
> a[5] = 'hello'
> a = []
> a[5] = 'hello'
> a[0] = 'hello'
> a
> print a
> a={}
> a['92']='92 - track7c blah blah'
> a
> a[92]='92 - track7c blah blah'
> a
> a[b]='sdfsdf'
> a[56]='sdfsdf'
> a
> a['a']='sdfsdfsdfsdfsdfs'
> a
> a
> #? del
> man del
> del(a,'92')
> a.del('92')
> a
> del(a,56)
> del(a[56])
> a
> '1234' + None
> Data
> '123'.find(1)
> '123'.find('1')
> '123'.find('3')
> '1233333'.find('3')
> #?'1233333'.find
> #?find
> #?find()
> dir(find())
> 
> *** Last line of input (may not be in above history):
> dir(find())
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.net
> http://scipy.net/mailman/listinfo/ipython-dev




More information about the IPython-dev mailing list