从 Flask Web 应用程序调用后端函数获取文件打开函数的访问冲突
Call a backend function from flask web app getting access violation for file open function
我有一个 flask 函数,如下所示。当我通过 html 触发它时,名为 (function_to_be_called) 的函数无法正常工作,因为它使用一个库 (prolog) 打开一个文件(prolog 配置文件)。
我收到 OSError: exception: access violation reading 0x0000000000000050
当我直接调用这个函数时,没有web界面一切正常。
我在执行函数和获取结果方面需要帮助。
亲切的问候,
费尔达
@app.route("/execute_scenario/", methods=["GET", "POST"])
def executeScenario():
form = IndexForm(request.form)
input1 = "something"
input2 = 5678
function_to_be_called(inpt1, input2)
return redirect(url_for("home"))
我切换到 PrologMQI。现在问题解决了。
我有一个 flask 函数,如下所示。当我通过 html 触发它时,名为 (function_to_be_called) 的函数无法正常工作,因为它使用一个库 (prolog) 打开一个文件(prolog 配置文件)。
我收到 OSError: exception: access violation reading 0x0000000000000050
当我直接调用这个函数时,没有web界面一切正常。
我在执行函数和获取结果方面需要帮助。 亲切的问候, 费尔达
@app.route("/execute_scenario/", methods=["GET", "POST"])
def executeScenario():
form = IndexForm(request.form)
input1 = "something"
input2 = 5678
function_to_be_called(inpt1, input2)
return redirect(url_for("home"))
我切换到 PrologMQI。现在问题解决了。