[英]Call a backend function from flask web app getting access violation for file open function
I have a flask function which is like below.我有一个 flask function ,如下所示。 When I trigger this via an html, the function named (function_to_be_called) does not work properly cause it uses a library (prolog) which opens a file (prolog config file).
当我通过 html 触发此操作时,名为(function_to_be_call)的 function 无法正常工作,因为它使用了一个库(prolog)来打开一个文件(prolog 配置文件)。
I am getting OSError: exception: access violation reading 0x0000000000000050我收到 OSError:异常:访问冲突读取 0x0000000000000050
When I call this function directly, without the web interface everything is ok.当我直接调用这个 function 时,没有 web 接口一切正常。
I need help in executing the function and getting the results.我需要帮助来执行 function 并获得结果。 Kind Regards, Ferda
亲切的问候,费尔达
@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"))
I switched to PrologMQI.我切换到 PrologMQI。 Now the problem is solved.
现在问题解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.