在启动flask后一段时间,出现如下的报错
Exception ignored in: <generator object probably_regex.<locals>.<genexpr> at 0x1134bf138>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/flask_cors/core.py", line 256, in <genexpr>
return any((c in maybe_regex for c in common_regex_chars))
SystemError: error return without exception set
仔细观察,发现此时并没有任何请求访问,程序也没任何异常,接口能正常访问
查阅资料,发现是和pycharm的设置有关,于是将pycharm->Run->Edit Configurations中添加Environment variable:
PYDEVD_USE_FRAME_EVAL=NO
重启之后,上述问题不再出现,但是为何flask_cors中会遇到这种现象?
给出的解释是
Raised when the interpreter finds an internal error, but the situation does not look so serious to cause it to abandon all hope. The associated value is a string indicating what went wrong (in low-level terms). -SystemError