[IPython-dev] Windows crash - pyreadline? [was Re: IPython Crash Report]
Fernando Perez
fperez.net at gmail.com
Thu Apr 15 13:54:44 EDT 2010
Howdy,
below is a crash report from a windows user (full report attached). I
tested with 0.10 on linux and can't reproduce the problem, what I get
is:
In [1]: 'esth'.startswith(None)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/fperez/tmp/junk/<ipython console> in <module>()
TypeError: expected a character buffer object
and the session continues OK, but I don't have a windows box right now
that I can test on.
Can anyone see it on windows?
Jorgen, do you think this could be a pyreadline problem?
Thanks for any feedback,
f
On Tue, Apr 13, 2010 at 4:30 PM, Tom Plunket <tom at readyatdawn.com> wrote:
> IPython rocks, thanks for developing it. Sorry for any stupid formatting
> this email may bring; work requirements y'know?
>
> Anyway- I've never seen an IPython crash before so this was surprising to
> say the least. I looked at the crash report and it appeared to have no
> history. I was curious what some_string.startswith(None) would do.
>
> The beginning of my IPython session looks like this. The last lines here
> are in the crash report preceding a bunch of blank-but-numbered lines. On
> Windows Vista x64 with pyreadline installed.
>
> Python 2.6.4 (r264:75706, Jan 22 2010, 17:24:21) [MSC v.1500 64 bit (AMD64)]
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.10 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
>
> In [1]: 'esth'.startswith(None)
> ---------------------------------------------------------------------------
> WindowsError Python 2.6.4: c:\python26\python.exe
> Tue Apr 13 16:20:03 2010
> 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:\Python26\Scripts\_ctypes\callbacks.c in 'calling callback function'()
> 280
> 281
-------------- next part --------------
***************************************************************************
IPython post-mortem report
IPython version: 0.10
BZR revision : 1210
Platform info : os.name -> nt, sys.platform -> win32
***************************************************************************
Current user configuration structure:
{'Version': 0,
'__allownew': True,
'alias': [],
'args': [],
'autocall': 1,
'autoedit_syntax': 0,
'autoexec': [],
'autoindent': 1,
'automagic': 1,
'banner': 1,
'c': '',
'cache_size': 1000,
'classic': 0,
'color_info': 1,
'colors': 'Linux',
'confirm_exit': 1,
'debug': 0,
'deep_reload': 0,
'editor': 'notepad',
'embedded': False,
'execfile': [],
'execute': [''],
'gthread': 0,
'help': 0,
'import_all': [],
'import_mod': [],
'import_some': [[]],
'include': [],
'interact': 0,
'ipythondir': u'C:\\Users\\Tom\\_ipython',
'log': 0,
'logfile': '',
'logplay': '',
'magic_docstrings': 0,
'messages': 1,
'multi_line_specials': 1,
'nosep': 0,
'object_info_string_level': 0,
'opts': Struct({'__allownew': True}),
'pdb': 0,
'pprint': 1,
'profile': '',
'prompt_in1': 'In [\\#]: ',
'prompt_in2': ' .\\D.: ',
'prompt_out': 'Out[\\#]: ',
'prompts_pad_left': 1,
'pydb': 0,
'pylab': 0,
'pylab_import_all': 1,
'q4thread': 0,
'qthread': 0,
'quick': 0,
'quiet': 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': -2,
'separate_in': '\n',
'separate_out': '',
'separate_out2': '',
'system_header': 'IPython system call: ',
'system_verbose': 0,
'term_title': 1,
'tk': 0,
'upgrade': 0,
'wildcards_case_sensitive': 1,
'wthread': 0,
'wxversion': '0',
'xmode': 'Context'}
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
WindowsError Python 2.6.4: c:\python26\python.exe
Tue Apr 13 16:20:03 2010
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:\Python26\Scripts\_ctypes\callbacks.c in 'calling callback function'()
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
--> 295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
c:\python26\lib\site-packages\pyreadline-1.5.dev_r0-py2.6.egg\pyreadline\console\console.pyc in hook_wrapper_23(stdin=1905849808L, stdout=1905849856L, prompt='\n\x01\x1b[0;32m\x02In [\x01\x1b[1;32m\x021\x01\x1b[0;32m\x02]: \x01\x1b[0m\x02')
666 if res and not isinstance(res, str):
667 raise TypeError, 'readline must return a string.'
668 except KeyboardInterrupt:
669 # GNU readline returns 0 on keyboard interrupt
670 return 0
671 except EOFError:
672 # It returns an empty string on EOF
673 res = ''
674 except:
675 print >>sys.stderr, 'Readline internal error'
676 traceback.print_exc()
677 res = '\n'
678 # we have to make a copy because the caller expects to free the result
679 n = len(res)
680 p = Console.PyMem_Malloc(n+1)
--> 681 cdll.msvcrt.strncpy(p, res, n+1)
682 return p
683
684 def hook_wrapper(prompt):
685 '''Wrap a Python readline so it behaves like GNU readline.'''
686 try:
687 # call the Python hook
688 res = ensure_str(readline_hook(prompt))
689 # make sure it returned the right sort of thing
690 if res and not isinstance(res, str):
691 raise TypeError, 'readline must return a string.'
692 except KeyboardInterrupt:
693 # GNU readline returns 0 on keyboard interrupt
694 return 0
695 except EOFError:
696 # It returns an empty string on EOF
WindowsError: exception: access violation writing 0x0000000000000000
***************************************************************************
History of session input:
*** Last line of input (may not be in above history):
More information about the IPython-dev
mailing list