Python Flask:InvokeHTTP引发IO异常。Java.net.SocketException:管道断开(写入失败)

2024-10-01 22:29:36 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个python脚本,它是使用NiFi(InvokeHttpPrcoessor)的python FlaskAPI调用的。我有时(并非总是)会出现以下错误

IO Exception thrown from InvokeHTTP. Java.net.SocketException: Broken pipe (Write failed)

这是我的主要任务

@app.route('/Customertax', methods = ['GET', 'POST'] )
def Customer_tax_main_f():
    outpath = Customer_tax.Customer_tax_f(request.data) 
    return send_file(outpath,"application/text")

这是我的.py代码,它具有主处理功能

def Customer_tax_f(file):
    other processing logic

Tags: fromio脚本def错误exceptioncustomerfile

热门问题