[New-bugs-announce] [issue25581] Python -U fails with traceback

ppperry report at bugs.python.org
Sat Nov 7 13:53:50 EST 2015

New submission from ppperry:

C:\Documents and Settings\Perry>python -U
Traceback (most recent call last):
  File "C:\Python27\lib\site.py", line 548, in <module>
  File "C:\Python27\lib\site.py", line 537, in main
  File "C:\Python27\lib\site.py", line 465, in aliasmbcs
    import locale, codecs
  File "C:\Python27\lib\locale.py", line 182, in <module>
    _percent_re = re.compile(r'%(?:\((?P<key>.*?)\))?'
  File "C:\Python27\lib\re.py", line 194, in compile
    return _compile(pattern, flags)
  File "C:\Python27\lib\re.py", line 249, in _compile
    p = sre_compile.compile(pattern, flags)
  File "C:\Python27\lib\sre_compile.py", line 576, in compile
    code = _code(p, flags)
  File "C:\Python27\lib\sre_compile.py", line 561, in _code
    _compile(code, p.data, flags)
  File "C:\Python27\lib\sre_compile.py", line 151, in _compile
    _compile(code, av[1], flags)
  File "C:\Python27\lib\sre_compile.py", line 132, in _compile
    _compile(code, av[2], flags)
  File "C:\Python27\lib\sre_compile.py", line 107, in _compile
    _compile_charset(av, flags, code, fixup, fixes)
  File "C:\Python27\lib\sre_compile.py", line 232, in _compile_charset
    flags & SRE_FLAG_UNICODE):
  File "C:\Python27\lib\sre_compile.py", line 316, in _optimize_charset
    p = charmap.find(b'\1', q)
TypeError: Type unicode doesn't support the buffer API

messages: 254293
nosy: ppperry
priority: normal
severity: normal
status: open
title: Python -U fails with traceback

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list