运行 flask with pypy 时如何解决这个错误?
how to solve this error when running flask with pypy?
当我尝试 运行 Flask with pypy 时发生了这个错误。当我 运行 和 python 它正常工作。
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\re.py", line 224, in compile
return _compile(pattern, flags)
File "C:\pypy3-v5.10.1-win32\lib-python\re.py", line 293, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\pypy3-v5.10.1-win32\lib-python\sre_compile.py", line 540, in compile
p = sre_parse.parse(p, flags)
File "C:\pypy3-v5.10.1-win32\lib-python\sre_parse.py", line 829, in parse
p = _parse_sub(source, pattern, 0)
File "C:\pypy3-v5.10.1-win32\lib-python\sre_parse.py", line 437, in _parse_sub
itemsappend(_parse(source, state))
File "C:\pypy3-v5.10.1-win32\lib-python\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
最新PyPy 3.6 HEAD可以导入flask。它是否有效是另一个问题...
当我尝试 运行 Flask with pypy 时发生了这个错误。当我 运行 和 python 它正常工作。
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\re.py", line 224, in compile
return _compile(pattern, flags)
File "C:\pypy3-v5.10.1-win32\lib-python\re.py", line 293, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\pypy3-v5.10.1-win32\lib-python\sre_compile.py", line 540, in compile
p = sre_parse.parse(p, flags)
File "C:\pypy3-v5.10.1-win32\lib-python\sre_parse.py", line 829, in parse
p = _parse_sub(source, pattern, 0)
File "C:\pypy3-v5.10.1-win32\lib-python\sre_parse.py", line 437, in _parse_sub
itemsappend(_parse(source, state))
File "C:\pypy3-v5.10.1-win32\lib-python\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
最新PyPy 3.6 HEAD可以导入flask。它是否有效是另一个问题...