我想弄清楚为什么我的输出会提前结束,当我把目录从我的硬盘驱动器到一个网站。我删除了调试模式的错误消息并得到以下错误:FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\Huang.LabTech2\\Desktop\\Images\\2017 Data\\Air Tractor 402/Air Tractor 402/5-10-2017/IR Filter'
我不知道它为什么在运行时寻找第二个Air Tractor 402文件夹,但其他文件夹也会出现这种情况:
^{pr2}$
我的代码:from flask import Flask, abort, send_file, render_template, render_template_string
import os
import remoteSensingData
app = Flask(__name__)
@app.route('/', defaults={'req_path': ''})
@app.route('/')
def dir_listing(req_path):
BASE_DIR = os.path.abspath(r'C:/Users/Huang.LabTech2/Desktop/Images/2017 Data/')
# Joining the base and the requested path
abs_path = os.path.join("c:", BASE_DIR, req_path)
# Return 404 if path doesn&