这行代码`image_data = MySql_†2.execute_query (sq1)`的返回值应该是一个元组类型,你需要提取出来: row = MySql_t2.execute_query(sq1) if row == None: raise Exception('...') image_bytes = row[0] return send_file(image_bytes, mime_type='...') 作为动态类型语言,一定要注意代码编辑器的类型提示,能避免很多错误。
阅读量:1
点赞量:0