When i was trying to run Flask with pypy this error occurred. When I run with python it works normally.

Traceback (most recent call last):
  File "flaska.py", line 1, in <module>
    from flask import Flask
  File "C:\pypy3-v5.10.1-win32\site-packages\flask\__init__.py", line 19, in <module>
    from jinja2 import Markup, escape
  File "C:\pypy3-v5.10.1-win32\site-packages\jinja2\__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "C:\pypy3-v5.10.1-win32\site-packages\jinja2\environment.py", line 22, in <module>
    from jinja2.lexer import get_lexer, TokenStream
  File "C:\pypy3-v5.10.1-win32\site-packages\jinja2\lexer.py", line 46, in <module>
    name_re = re.compile(r'[\w{0}]+'.format(_identifier.pattern))
  File "C:\pypy3-v5.10.1-win32\lib-python\3\re.py", line 224, in compile
    return _compile(pattern, flags)
  File "C:\pypy3-v5.10.1-win32\lib-python\3\re.py", line 293, in _compile
    p = sre_compile.compile(pattern, flags)
  File "C:\pypy3-v5.10.1-win32\lib-python\3\sre_compile.py", line 540, in compile
    p = sre_parse.parse(p, flags)
  File "C:\pypy3-v5.10.1-win32\lib-python\3\sre_parse.py", line 829, in parse
    p = _parse_sub(source, pattern, 0)
  File "C:\pypy3-v5.10.1-win32\lib-python\3\sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
  File "C:\pypy3-v5.10.1-win32\lib-python\3\sre_parse.py", line 575, in _parse
    raise source.error(msg, len(this) + 1 + len(that))
sre_constants.error: bad character range \udf76-\ud800 at position 459

1 Answers

mattip On Best Solutions

Latest PyPy 3.6 HEAD can import flask. Whether it works or not is another question...