OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: ‘http://localhost:5000/static/images/DICOMDIR 5.26-6.1/3644351_GOUT_1_0_12.png’
http://localhost:5000/static/images/DICOMDIR 5.26-6.1/3644351_GOUT_1_0_12.png是存储在数据库中提供给前端用于获取后端图片文件的URL,但是计算机在本地找不到这个地址,需要将http://localhost:5000/去掉
file_path = 'http://localhost:5000/static/images/DICOMDIR 5.26-6.1/3644351_GOUT_1_0_12.png'
# 去掉特定前缀部分
file_name = file_path.replace('http://localhost:5000/', '')