使用的模块
from flask import Flask,request
报错:
raise RuntimeError(_request_ctx_err_msg)
RuntimeError: Working outside of request context.
This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.
本人新手,一阵百度之后,直接将错误抛出
try…
except:
pass
代码用法如下:
小提示
对于新手写python,如果有报错的问题,百度或者谷歌解决不了,可以尝试一下万能的try…except,能错误信息直接丢弃