下面是烧瓶代码(app.py)
@app.route('/api/data', methods=['GET'])
def createvip():
return send_file('./data.csv', attachment_filename='data.csv', conditional=True)
def run_app(port):
app = CustomFlaskApp()
app.run(port)
if __name__ == '__main__':
port = int(os.getenv('PORT', 5000))
run_app(port=port)
以下是引发的错误消息:
(<class 'tornado.httputil.HTTPOutputError'>, HTTPOutputError('Tried to write more data than Content-Length',)
以下是正在使用的软件包的版本号:
'Flask==1.0.2',
'Flask-RESTful==0.3.6'
Python version = Python 2.7.14