Closed alalert closed 6 months ago
1, 你上传的 .nii
图像在我部署的线上环境和你本地是否都上传失败。
2, 如果是你本地环境报错,请给出具体的报错信息。
我通过debug查找,发现在 with open(temp_file_path, 'wb') as file: 这一句报错跳入到except异常处理,然后refresh()又进入代码开始处,所以一直没办法进入到后续识别分类中
if is_demo is False: #上传.nii图像 try: inpic = pywebio.input.file_upload(label="上传医学影像(.nii)") inpic = BytesIO(inpic['content'])
temp_file_path = "./nii/" + generate_random_str() + ".nii" with open(temp_file_path, 'wb') as file: #此句运行后跳到except中了 file.write(inpic.getvalue()) # 保存到本地 print_logs("upload_file," + temp_file_path + ",\n", user_ip)
except : pywebio.output.toast("输入错误,请上传医学影像文件(.nii)", color="warn") refresh()
------------------ 原始邮件 ------------------ 发件人: "bytesc/Image_Recognition_WebGUI" @.>; 发送时间: 2024年2月21日(星期三) 下午5:00 @.>; 抄送: "20级通信工程 @.**@.>; 主题: Re: [bytesc/Image_Recognition_WebGUI] 上传图像失败 (Issue #5)
1, 你上传的 .nii 图像在我部署的线上环境和你本地是否都上传失败。 2, 如果是你本地环境报错,请给出具体的报错信息。
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
你的路径下是否存在,./nii/
这个文件夹,没有就新建一个空的。
各种环境已经按照requirement安装好了(tqdm库我是下载的 4.66.1版本),仍无法解决图像上传问题,