Traceback (most recent call last): File "C:\yolov5-5.0\detect.py", line 178, in <module> detect() File "C:\yolov5-5.0\detect.py", line 34, in detect model = attempt_load(weights, map_location=device) # load FP32 model File "C:\yolov5-5.0\models\experimental.py", line 118, in attempt_load ckpt = torch.load(w, map_location=map_location) # load File "C:\Users\admin\.conda\envs\gwstu_env\lib\site-packages\torch\serialization.py", line 789, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "C:\Users\admin\.conda\envs\gwstu_env\lib\site-packages\torch\serialization.py", line 1131, in _load result = unpickler.load() File "C:\Users\admin\.conda\envs\gwstu_env\lib\site-packages\torch\serialization.py", line 1124, in find_class return super().find_class(mod_name, name) AttributeError: Can't get attribute 'SPPF' on <module 'models.common' from 'C:\\yolov5-5.0\\models\\common.py'>

时间: 2023-08-24 21:09:09 浏览: 319
这是一个Python错误追踪(Traceback),说明在运行 `C:\yolov5-5.0\detect.py` 文件时出现了错误。具体来说,错误是由 `AttributeError` 引发的,原因是无法在 `models.common` 模块中获取名为 `SPPF` 的属性。 可能的原因是在 `models.common` 模块中不存在名为 `SPPF` 的属性。你可以检查一下代码中是否正确地引用了 `models.common` 模块中的属性名。另外,你也可以检查一下 `models.common` 模块是否存在或是否被正确导入。
相关问题

Traceback (most recent call last): File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\detect.py", line 178, in <module> detect() File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\detect.py", line 53, in detect dataset = LoadImages(source, img_size=imgsz, stride=stride) File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\utils\datasets.py", line 132, in __init__ raise Exception(f'ERROR: {p} does not exist') Exception: ERROR: D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\data\imges\bus.jpg does not exist

<think>嗯,用户遇到了YOLOv5中的LoadImages异常,提示路径不存在的问题。我需要帮他解决这个问题。首先,我应该回顾一下YOLOv5的数据加载机制。根据引用[1],YOLOv5的数据加载器分为LoadStreams和LoadImages两种情况,判断是摄像头输入还是本地文件。用户的问题应该是在使用本地文件时出现的,所以需要检查source参数是否正确。 接下来,用户需要确认数据集路径是否正确。常见的错误可能是路径中的拼写错误或者使用了绝对/相对路径不当。例如,用户可能在配置文件中写了相对路径,但执行时的当前目录不同,导致找不到文件。这时候建议用户使用绝对路径,或者在代码中打印当前路径来确认。 然后,检查dataset.yaml文件的配置。引用[2]提到在yolov7/data下创建dataset.yaml,但用户使用的是YOLOv5,结构应该类似。需要确保yaml文件中的路径正确,比如train和val的路径是否存在。可能用户忘记修改默认的coco路径,导致指向了错误的位置。 另外,路径中的符号问题也很重要。比如在Windows中反斜杠需要转义,或者路径包含空格没有用引号包裹。这些细节可能会导致程序无法正确识别路径,从而抛出异常。 还有,权限问题也可能导致无法访问路径,尤其是Linux系统下。需要检查是否有读取权限,或者文件是否被其他程序占用。 最后,代码调试部分,建议用户在加载数据集之前添加打印语句,输出source的值,确认是否如预期。同时,使用os.path.exists来检查路径是否存在,这样可以快速定位问题。 总结下来,处理步骤应该是:1. 检查路径是否存在;2. 验证dataset.yaml配置;3. 处理特殊字符和权限;4. 代码调试和异常捕获。此外,引用[3]中的数据集加载文章可能对用户有帮助,可以推荐他进一步阅读。</think>### YOLOv5路径异常处理步骤 #### 1. 确认数据集路径有效性 - **绝对路径检查**:使用`os.path.exists()`验证路径是否存在 ```python import os source = "your_dataset/images/train" print(os.path.abspath(source)) # 输出绝对路径 print(os.path.exists(source)) # 返回True/False ``` - **路径格式规范**: - Windows系统示例:`D:/yolov5/data/coco/images/train2017` - Linux系统示例:`/home/user/yolov5/data/coco/images/train2017` #### 2. 检查dataset.yaml配置 参考引用[2],确保配置文件包含正确路径层级: ```yaml # yolov5/data/dataset.yaml train: ../coco/images/train2017 val: ../coco/images/val2017 test: ../coco/images/test2017 ``` #### 3. 处理路径特殊字符 - 转义空格和特殊符号: ```python # 错误示例 source = "My Dataset" # 包含空格未处理 # 正确处理 source = "'My Dataset'" # Linux/Mac source = '"My Dataset"' # Windows ``` #### 4. 代码调试方法 在数据加载代码段前添加验证逻辑: ```python from pathlib import Path def check_source(source): p = Path(source) if not p.exists(): raise FileNotFoundError(f"⚠️ 关键错误: {p.resolve()} 路径不存在") return str(p) ``` #### 5. 异常捕获机制 修改数据加载代码段(参考引用[1]): ```python try: if webcam: dataset = LoadStreams(source, img_size=imgsz, stride=stride, auto=pt) else: dataset = LoadImages(source, img_size=imgsz, stride=stride, auto=pt) except FileNotFoundError as e: print(f"❌ 数据加载失败: {str(e)}") print("✅ 解决方案:") print("1. 检查终端当前工作目录") print("2. 使用可视化路径验证工具") print("3. 检查yaml文件缩进格式") sys.exit(1) ``` #### 6. 路径配置最佳实践 - **推荐目录结构**: ``` yolov5/ ├── data/ │ ├── dataset.yaml │ └── coco/ │ ├── images/ │ │ ├── train2017/ │ │ └── val2017/ │ └── labels/ └── train.py ``` ### 典型错误案例分析 ```python # 错误配置示例 train: ../data/coco/images/train # 实际路径是 ./data/coco/images # 修正方案 train: ./data/coco/images/train ```

Traceback (most recent call last): File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\detect.py", line 178, in <module> detect() File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\detect.py", line 34, in detect model = attempt_load(weights, map_location=device, weights_only=False) # load FP32 model TypeError: attempt_load() got an unexpected keyword argument 'weights_only'

<think>好的,我现在需要帮助用户解决这个TypeError: attempt_load() got an unexpected keyword argument 'weights_only'的错误,特别是在使用YOLOv5的Python代码时。首先,我应该回忆一下这个错误的常见原因。 用户提到的是attempt_load()函数接收了未预期的关键字参数'weights_only'。根据经验,这类错误通常是因为函数在某个版本中更新了参数列表,而用户使用的代码或环境中的库版本不兼容导致的。比如,可能用户使用的YOLOv5版本较旧,而代码中使用了新版本才引入的参数,或者相反。 接下来,我需要确认YOLOv5中attempt_load函数的参数变化。查阅YOLOv5的官方文档或GitHub仓库的提交历史可能会有帮助。例如,在YOLOv5的某个版本之后,可能移除了'weights_only'参数,或者将其重命名了。或者,用户可能在调用函数时错误地添加了这个参数,而实际上并不需要。 另外,检查用户使用的YOLOv5版本也很重要。如果用户使用的是较新的版本,可能需要调整参数;如果是旧版本,可能需要升级或降级。例如,在YOLOv5的某些版本中,加载模型时可能使用不同的参数,如'pretrained'或者'auto_shape',而不是'weights_only'。 还可能涉及到PyTorch的版本问题。'weights_only'参数可能与PyTorch的模型加载方式有关,特别是在安全加载模型时。例如,PyTorch 1.10引入了torch.load()中的'weights_only'选项,用于防止潜在的恶意代码执行。如果YOLOv5的attempt_load函数内部使用了这个参数,但用户的环境中的PyTorch版本过低,就会导致错误。 接下来,我需要考虑可能的解决方案。首先,建议用户检查他们的YOLOv5和PyTorch版本,确保版本兼容。升级或降级到适当的版本可能会解决问题。例如,如果'weights_only'是在新版本中引入的,而用户的环境是旧版本,就需要升级PyTorch或YOLOv5。 另一个可能的解决方法是修改代码,移除'weights_only'参数,或者替换为正确的参数名。例如,查看YOLOv5的官方示例,确认正确的参数名称和用法,然后调整用户的代码以匹配。 此外,用户可能在调用attempt_load时传递了其他不兼容的参数,或者模型文件本身有问题。需要检查调用代码的上下文,确认参数传递是否正确,模型路径是否存在,文件是否完整。 最后,如果用户的问题仍未解决,可能需要更详细的错误堆栈信息或代码片段来进一步诊断。例如,查看错误发生的具体行号,以及attempt_load函数在哪个模块中被调用,是否有自定义的修改等。 总结来说,解决这个错误的关键步骤包括检查库版本、确认函数参数的正确性、调整代码或环境版本,以及验证模型文件的完整性。通过这些步骤,应该能够帮助用户解决TypeError的问题。</think>关于解决YOLOv5中出现的`TypeError: attempt_load() got an unexpected keyword argument 'weights_only'`错误,以下是逐步解决方案: ### 1. **确认库版本兼容性** - **问题根源**:`weights_only`是PyTorch在1.10版本引入的参数,用于安全加载模型(防止反序列化恶意代码)[^1]。若你的PyTorch版本低于1.10,或YOLOv5代码未适配此参数,会触发该错误。 - **解决方法**: - 升级PyTorch至1.10+: ```bash pip install torch>=1.10 --upgrade ``` - 同步更新YOLOv5代码库: ```bash git clone https://github.com/ultralytics/yolov5 # 若未克隆则先克隆 cd yolov5 git pull # 更新到最新版本 ``` ### 2. **修改代码参数** - **若仍需兼容旧版本**:移除`weights_only`参数或替换为旧版本支持的参数。例如: ```python model = attempt_load('yolov5s.pt', map_location='cpu') # 删除weights_only=True ``` - **参数对照**: - 旧版本可能使用`pretrained=True`或`autoshape=True`,需参考对应版本的文档。 ### 3. **验证模型文件完整性** - 模型文件损坏或格式错误可能导致加载失败: - 重新下载预训练模型: ```python torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v6.1/yolov5s.pt', 'yolov5s.pt') ``` ### 4. **环境隔离与依赖检查** - 使用虚拟环境避免依赖冲突: ```bash python -m venv yolov5_env source yolov5_env/bin/activate # Linux/macOS yolov5_env\Scripts\activate # Windows pip install -r requirements.txt ``` ### 示例代码修正 ```python import torch # 正确调用方式(适配最新版本) model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True, autoshape=True) ``` ---
阅读全文

相关推荐

Traceback (most recent call last): File "<string>", line 1, in <module> File "D:\ANACONDA\envs\yolov5_new\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "D:\ANACONDA\envs\yolov5_new\lib\multiprocessing\spawn.py", line 125, in _main prepare(preparation_data) File "D:\ANACONDA\envs\yolov5_new\lib\multiprocessing\spawn.py", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File "D:\ANACONDA\envs\yolov5_new\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File "D:\ANACONDA\envs\yolov5_new\lib\runpy.py", line 288, in run_path return _run_module_code(code, init_globals, run_name, File "D:\ANACONDA\envs\yolov5_new\lib\runpy.py", line 97, in _run_module_code _run_code(code, mod_globals, init_globals, File "D:\ANACONDA\envs\yolov5_new\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\train.py", line 24, in <module> import test # import test.py to get mAP after each epoch File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\test.py", line 12, in <module> from models.experimental import attempt_load File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\models\experimental.py", line 7, in <module> from models.common import Conv, DWConv File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\models\common.py", line 17, in <module> from utils.plots import color_list, plot_one_box File "D:\ptcharm\project\pythonProject\yolov5-5.0\yolov5-5.0\utils\plots.py", line 19, in <module> from scipy.signal import butter, filtfilt File "D:\ANACONDA\envs\yolov5_new\lib\site-packages\scipy\signal\__init__.py", line 330, in <module> from ._peak_finding import * File "D:\ANACONDA\envs\yolov5_new\lib\site-packages\scipy\signal\_peak_finding.py", line 8, in <module> from scipy.stats import scor

D:\yolov5-5.0\utils\general.py:96: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources as pkg YOLOv5 2021-4-12 torch 2.7.1+cpu CPU Traceback (most recent call last): File "D:\yolov5-5.0\detect.py", line 178, in <module> detect() File "D:\yolov5-5.0\detect.py", line 34, in detect model = attempt_load(weights, map_location=device) # load FP32 model ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\yolov5-5.0\models\experimental.py", line 118, in attempt_load ckpt = torch.load(w, map_location=map_location) # load ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\yolov5-5.0\.venv\Lib\site-packages\torch\serialization.py", line 1524, in load raise pickle.UnpicklingError(_get_wo_message(str(e))) from None _pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint. (1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source. (2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message. WeightsUnpickler error: Unsupported global: GLOBAL numpy.core.multiarray._reconstruct was not an allowed global by default. Please use torch.serialization.add_safe_globals([numpy.core.multiarray._reconstruct]) or the torch.serialization.safe_globals([numpy.core.multiarray._reconstruct]) context manager to allowlist this global if you trust this class/function. Check the documentation of torch.load to learn more about types accepted by default with weights_only https://pytorch.org/docs/stable/generated/torch.load.html.

Namespace(weights='runs/train/exp/weights/best.pt', source='D:/Code/yolov5/detect1.jpg', img_size=640, conf_thres=0.25, iou_thres=0.45, device='', view_img=False , save_txt=False, save_conf=False, nosave=False, classes=None, agnostic_nms=False, augment=False, update=False, project='runs/detect', name='exp', exist_ok=False) YOLOv5 2021-4-11 torch 2.7.1+cpu CPU Traceback (most recent call last): File "D:\Code\yolov5\detect.py", line 180, in <module> detect() File "D:\Code\yolov5\detect.py", line 34, in detect model = attempt_load(weights, map_location=device) # load FP32 model ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Code\yolov5\models\experimental.py", line 118, in attempt_load ckpt = torch.load(w, map_location=map_location) # load ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Editor\anaconda3\envs\yolov5-5.0\Lib\site-packages\torch\serialization.py", line 1524, in load raise pickle.UnpicklingError(_get_wo_message(str(e))) from None _pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint. (1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source. (2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message. WeightsUnpickler error: Unsupported global: GLOBAL numpy._core.multiarray._reconstruct was not an allowed global by default. Please use torch.serializat ion.add_safe_globals([numpy._core.multiarray._reconstruct]) or the torch.serialization.safe_globals([numpy._core.multiarray._reconstruct]) context manager to allowlist this global if you trust this class/function.

E:\soft\soft_work\anaconda\envs\sf-yolo\python.exe D:\deep_learning\paper\CODE1\yolov12-main\yolov12-main\yolov12.py --lr0 1e-5, --grad_clip 1.0 设置多进程支持... 开始训练... 启动YOLOv12训练... Traceback (most recent call last): File "D:\deep_learning\paper\CODE1\yolov12-main\yolov12-main\yolov12.py", line 60, in <module> main() File "D:\deep_learning\paper\CODE1\yolov12-main\yolov12-main\yolov12.py", line 17, in main results = model.train( ^^^^^^^^^^^^ File "D:\deep_learning\paper\CODE1\yolov12-main\yolov12-main\ultralytics\engine\model.py", line 802, in train self.trainer = (trainer or self._smart_load("trainer"))(overrides=args, _callbacks=self.callbacks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\deep_learning\paper\CODE1\yolov12-main\yolov12-main\ultralytics\engine\trainer.py", line 101, in __init__ self.args = get_cfg(cfg, overrides) ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\deep_learning\paper\CODE1\yolov12-main\yolov12-main\ultralytics\cfg\__init__.py", line 298, in get_cfg check_dict_alignment(cfg, overrides) File "D:\deep_learning\paper\CODE1\yolov12-main\yolov12-main\ultralytics\cfg\__init__.py", line 485, in check_dict_alignment raise SyntaxError(string + CLI_HELP_MSG) from e SyntaxError: 'hyp' is not a valid YOLO argument. 'clip_grad' is not a valid YOLO argument. Arguments received: ['yolo', '--lr0', '1e-5,', '--grad_clip', '1.0']. Ultralytics 'yolo' commands use the following syntax: yolo TASK MODE ARGS Where TASK (optional) is one of {'obb', 'segment', 'pose', 'detect', 'classify'} MODE (required) is one of {'track', 'predict', 'val', 'export', 'benchmark', 'train'} ARGS (optional) are any number of custom 'arg=value' pairs like 'imgsz=320' that override defaults. See all ARGS at https://docs.ultralytics.com/usage/cfg or with 'yolo cfg' 1. Train a detection model for 10 epochs with an initial learning_rate of 0.01 yolo train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01 2. Predict a YouTube video using a pretrained segmentation model at image size 320: yolo predict model=yolo11n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320 3. Val a pretrained detection model at batch-size 1 and image size 640: yolo val model=yolo11n.pt data=coco8.yaml batch=1 imgsz=640 4. Export a YOLO11n classification model to ONNX format at image size 224 by 128 (no TASK required) yolo export model=yolo11n-cls.pt format=onnx imgsz=224,128 5. Ultralytics solutions usage yolo solutions count or in ['heatmap', 'queue', 'speed', 'workout', 'analytics', 'trackzone', 'inference'] source="path/to/video/file.mp4" 6. Run special commands: yolo help yolo checks yolo version yolo settings yolo copy-cfg yolo cfg yolo solutions help Docs: https://docs.ultralytics.com Solutions: https://docs.ultralytics.com/solutions/ Community: https://community.ultralytics.com GitHub: https://github.com/ultralytics/ultralytics 进程已结束,退出代码为 1

Traceback (most recent call last): File "C:\Program Files\Python310\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 286, in ffmpeg_parse_infos match = re.findall("([0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9])", line)[0] IndexError: list index out of range During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Administrator\PycharmProjects\pythonProject\bilibili视频提取.py", line 16, in <module> audio = AudioFileClip('美女1.mp3').subclip(1, 27) File "C:\Program Files\Python310\lib\site-packages\moviepy\audio\io\AudioFileClip.py", line 70, in __init__ self.reader = FFMPEG_AudioReader(filename, fps=fps, nbytes=nbytes, File "C:\Program Files\Python310\lib\site-packages\moviepy\audio\io\readers.py", line 51, in __init__ infos = ffmpeg_parse_infos(filename) File "C:\Program Files\Python310\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 289, in ffmpeg_parse_infos raise IOError(("MoviePy error: failed to read the duration of file %s.\n" OSError: MoviePy error: failed to read the duration of file 美女1.mp3. Here are the file infos returned by ffmpeg: ffmpeg version 7.1-essentials_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers built with gcc 14.2.0 (Rev1, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12

yolov12源代码自带的app.py为什么运行不了:ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__ raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__ await self.app(scope, receive, _send) File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__ await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app await route.handle(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool return await anyio.to_thread.run_sync(func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main gradio_api_info = api_info(False) ^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info app.api_info = app.get_blocks().get_api_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info python_type = client_utils.json_schema_to_python_type(info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type type_ = _json_schema_to_python_type(schema, schema.get("$defs")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type des = [ ^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type type_ = get_type(schema) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 863, in get_type if "const" in schema: ^^^^^^^^^^^^^^^^^ TypeError: argument of type 'bool' is not iterable ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__ raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__ await self.app(scope, receive, _send) File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__ await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app await route.handle(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool return await anyio.to_thread.run_sync(func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main gradio_api_info = api_info(False) ^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info app.api_info = app.get_blocks().get_api_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info python_type = client_utils.json_schema_to_python_type(info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type type_ = _json_schema_to_python_type(schema, schema.get("$defs")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type des = [ ^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type type_ = get_type(schema) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 863, in get_type if "const" in schema: ^^^^^^^^^^^^^^^^^ TypeError: argument of type 'bool' is not iterable ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__ raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__ await self.app(scope, receive, _send) File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__ await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app await route.handle(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool return await anyio.to_thread.run_sync(func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main gradio_api_info = api_info(False) ^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info app.api_info = app.get_blocks().get_api_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info python_type = client_utils.json_schema_to_python_type(info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type type_ = _json_schema_to_python_type(schema, schema.get("$defs")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type des = [ ^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type type_ = get_type(schema) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 863, in get_type if "const" in schema: ^^^^^^^^^^^^^^^^^ TypeError: argument of type 'bool' is not iterable ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__ raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__ await self.app(scope, receive, _send) File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__ await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app await route.handle(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool return await anyio.to_thread.run_sync(func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main gradio_api_info = api_info(False) ^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info app.api_info = app.get_blocks().get_api_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info python_type = client_utils.json_schema_to_python_type(info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type type_ = _json_schema_to_python_type(schema, schema.get("$defs")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type des = [ ^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type type_ = get_type(schema) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 863, in get_type if "const" in schema: ^^^^^^^^^^^^^^^^^ TypeError: argument of type 'bool' is not iterable ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__ raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__ await self.app(scope, receive, _send) File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__ await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app await route.handle(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool return await anyio.to_thread.run_sync(func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main gradio_api_info = api_info(False) ^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info app.api_info = app.get_blocks().get_api_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info python_type = client_utils.json_schema_to_python_type(info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type type_ = _json_schema_to_python_type(schema, schema.get("$defs")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type des = [ ^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type type_ = get_type(schema) ^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 863, in get_type if "const" in schema: ^^^^^^^^^^^^^^^^^ TypeError: argument of type 'bool' is not iterable Traceback (most recent call last): File "G:\yfwh\yolov12-main\app.py", line 165, in <module> gradio_app.launch() File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2465, in launch raise ValueError( ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost. Exception in thread Thread-5 (_do_normal_analytics_request): Traceback (most recent call last): File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_transports\default.py", line 101, in map_httpcore_exceptions yield File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_transports\default.py", line 250, in handle_request resp = self._pool.handle_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection_pool.py", line 256, in handle_request raise exc from None File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection_pool.py", line 236, in handle_request response = connection.handle_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection.py", line 101, in handle_request raise exc File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection.py", line 78, in handle_request stream = self._connect(request) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection.py", line 156, in _connect stream = stream.start_tls(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_backends\sync.py", line 154, in start_tls with map_exceptions(exc_map): File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout: _ssl.c:989: The handshake operation timed out The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\threading.py", line 1045, in _bootstrap_inner self.run() File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\analytics.py", line 70, in _do_normal_analytics_request data["ip_address"] = get_local_ip_address() ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\analytics.py", line 131, in get_local_ip_address ip_address = httpx.get( ^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_api.py", line 195, in get return request( ^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_api.py", line 109, in request return client.request( ^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 825, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 914, in send response = self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 1014, in _send_single_request response = transport.handle_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_transports\default.py", line 249, in handle_request with map_httpcore_exceptions(): File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_transports\default.py", line 118, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout: _ssl.c:989: The handshake operation timed out

最新推荐

recommend-type

IP网络基础知识及原理.ppt

IP网络基础知识及原理.ppt
recommend-type

网络游戏运营培训资料第一讲市场推广.ppt

网络游戏运营培训资料第一讲市场推广.ppt
recommend-type

园林绿化工程项目管理要点.ppt

园林绿化工程项目管理要点.ppt
recommend-type

单片机与嵌入式系统C语言编程.ppt

单片机与嵌入式系统C语言编程.ppt
recommend-type

传感器与PLC编程技术基础.ppt

传感器与PLC编程技术基础.ppt
recommend-type

Evc Sql CE 程序开发实践与样例代码分享

在详细解释标题、描述和标签中提及的知识点之前,需要指出“压缩包子文件的文件名称列表”中的“8”可能是不完整的上下文信息。由于缺乏具体的文件列表内容,我们将主要集中在如何理解“Evc Sql CE 程序样例代码”这一主题。 标题“Evc Sql CE 程序样例代码”直接指向一个程序开发样例代码,其中“Evc”可能是某种环境或工具的缩写,但由于没有更多的上下文信息,很难精确地解释这个缩写指的是什么。不过,“Sql CE”则明确地指向了“SQL Server Compact Edition”,它是微软推出的一个轻量级数据库引擎,专为嵌入式设备和小型应用程序设计。 ### SQL Server Compact Edition (SQL CE) SQL Server Compact Edition(简称SQL CE)是微软公司提供的一个嵌入式数据库解决方案,它支持多种平台和编程语言。SQL CE适合用于资源受限的环境,如小型应用程序、移动设备以及不需要完整数据库服务器功能的场合。 SQL CE具备如下特点: - **轻量级**: 轻便易用,对系统资源占用较小。 - **易于部署**: 可以轻松地将数据库文件嵌入到应用程序中,无需单独安装。 - **支持多平台**: 能够在多种操作系统上运行,包括Windows、Windows CE和Windows Mobile等。 - **兼容性**: 支持标准的SQL语法,并且在一定程度上与SQL Server数据库系统兼容。 - **编程接口**: 提供了丰富的API供开发者进行数据库操作,支持.NET Framework和本机代码。 ### 样例代码的知识点 “Evc Sql CE 程序样例代码”这部分信息表明,存在一些示例代码,这些代码可以指导开发者如何使用SQL CE进行数据库操作。样例代码一般会涵盖以下几个方面: 1. **数据库连接**: 如何创建和管理到SQL CE数据库的连接。 2. **数据操作**: 包括数据的增删改查(CRUD)操作,这些是数据库操作中最基本的元素。 3. **事务处理**: 如何在SQL CE中使用事务,保证数据的一致性和完整性。 4. **数据表操作**: 如何创建、删除数据表,以及修改表结构。 5. **数据查询**: 利用SQL语句查询数据,包括使用 SELECT、JOIN等语句。 6. **数据同步**: 如果涉及到移动应用场景,可能需要了解如何与远程服务器进行数据同步。 7. **异常处理**: 在数据库操作中如何处理可能发生的错误和异常。 ### 标签中的知识点 标签“Evc Sql CE 程序样例代码”与标题内容基本一致,强调了这部分内容是关于使用SQL CE的示例代码。标签通常用于标记和分类信息,方便在搜索引擎或者数据库中检索和识别特定内容。在实际应用中,开发者可以根据这样的标签快速找到相关的样例代码,以便于学习和参考。 ### 总结 根据标题、描述和标签,我们可以确定这篇内容是关于SQL Server Compact Edition的程序样例代码。由于缺乏具体的代码文件名列表,无法详细分析每个文件的内容。不过,上述内容已经概述了SQL CE的关键特性,以及开发者在参考样例代码时可能关注的知识点。 对于希望利用SQL CE进行数据库开发的程序员来说,样例代码是一个宝贵的资源,可以帮助他们快速理解和掌握如何在实际应用中运用该数据库技术。同时,理解SQL CE的特性、优势以及编程接口,将有助于开发者设计出更加高效、稳定的嵌入式数据库解决方案。
recommend-type

【浪潮FS6700交换机配置实战】:生产环境快速部署策略与技巧

# 1. 浪潮FS6700交换机概述 浪潮FS6700交换机是一款高端、具备高密度端口的全千兆交换机。它采用模块化设计,支持万兆上行,可提供灵活的端口组合和高带宽解决方案,满足了企业网络对于高性能、高可靠性的需求。浪潮FS6700交换机通常部署在企业网络的核心层或汇聚层,不仅提供强劲的网络数据交换能力,而且支持丰富的路由协议和安全特性,为中大型网络构建提供了强有力的保障。 接下来,我们将深
recommend-type

YOLO11训练批次参考

<think>我们正在讨论YOLOv11的训练批次设置。首先,需要明确的是,截至2023年10月,官方并没有发布YOLOv11版本。YOLO系列的最新版本是YOLOv8(由Ultralytics发布)。因此,这里可能指的是YOLO的某个变体或非官方版本。不过,我们可以基于YOLO系列的一般训练实践来讨论训练批次(batch size)的设置。 训练批次(batch size)是指在训练神经网络时,每次迭代中用于计算梯度并更新权重的样本数量。设置合适的batch size对训练效果和速度有重要影响。 ### 影响batch size选择的因素: 1. **硬件限制**:显存大小是主要限制因素
recommend-type

数据库考试复习必备五套习题精讲

根据给定的文件信息,本文将详细解释数据库习题相关知识点。首先,从标题中我们可以得知,该文件为数据库习题集,包含五套习题卷,非常适合用来准备考试。由于文件描述中提到考完试后才打算分享,说明这些习题具有一定的质量和难度,可以作为考试前的必备材料。 首先,我们来解释“数据库”这一核心概念。数据库是存储、管理、处理和检索信息的系统,它能够帮助我们有效地存储大量的数据,并在需要的时候快速访问。数据库管理系统(DBMS)是负责数据库创建、维护和操作的软件,常见的数据库管理系统包括MySQL、Oracle、Microsoft SQL Server、PostgreSQL和SQLite等。 数据库习题通常包括以下知识点: 1. 数据库设计:设计数据库时需要考虑实体-关系模型(ER模型)、规范化理论以及如何设计表结构。重点包括识别实体、确定实体属性、建立实体之间的关系以及表之间的关联。规范化是指将数据库表结构进行合理化分解,以减少数据冗余和提高数据一致性。 2. SQL语言:结构化查询语言(SQL)是用于管理数据库的标准计算机语言,它包括数据查询、数据操纵、数据定义和数据控制四个方面的功能。对于数据库习题来说,重点会涉及到以下SQL语句: - SELECT:用于从数据库中查询数据。 - INSERT、UPDATE、DELETE:用于向数据库中插入、更新或删除数据。 - CREATE TABLE、ALTER TABLE、DROP TABLE:用于创建、修改或删除表结构。 - JOIN:用于连接两个或多个表来查询跨越表的数据。 - GROUP BY 和 HAVING:用于对数据进行分组统计和筛选。 -事务处理:包括事务的ACID属性(原子性、一致性、隔离性、持久性)等。 3. 数据库操作:涉及实际操作数据库的过程,包括数据导入导出、备份与恢复、索引创建与优化等。这些内容能够帮助理解如何高效地管理数据。 4. 数据库安全:保障数据库不受未授权访问和破坏的机制,例如用户权限管理、视图、存储过程等安全措施。 5. 数据库优化:如何提升数据库的性能,包括查询优化、数据库配置优化、索引策略、系统资源监控等。 6. 数据库应用开发:如何利用数据库在应用程序中实现数据的持久化存储,如数据库连接、事务管理、数据访问对象(DAO)设计模式等。 7. 高级主题:涉及到复杂查询、数据库触发器、存储过程的编写和优化,以及可能包含的特定数据库系统的特定特性(如Oracle的PL/SQL编程等)。 由于文件名称列表只提供“数据库习题”这一个信息点,我们无法得知具体的习题内容和难度,但是可以肯定的是,这份习题集应该覆盖了上述所提到的知识点。对于考生来说,这些习题将帮助他们巩固理论知识,并且提高解决实际问题的能力,是考试前准备的有力工具。 在准备数据库相关的考试时,建议先从基础概念开始复习,然后逐步过渡到SQL语法和数据库设计的实践操作。在习题练习中,注意不要仅限于死记硬背,更重要的是理解每一个操作背后的逻辑和原理。如果可能的话,实际操作一个数据库,将理论知识应用到实践中去,这会帮助你更加深刻地理解数据库的工作机制。最后,反复练习模拟题,可以帮助你熟悉考试的题型和难度,提高考试时的应试技巧。
recommend-type

【浪潮FS6700交换机故障诊断与排除】:掌握这些方法,让你的网络稳定如初

# 1. 浪潮FS6700交换机故障诊断基础知识 在本章中,我们将探讨浪潮FS6700交换机故障诊断的基础知识,为后续章节中更深层次的理论和实践内容打下坚实的基础。我们将从以下几个方面入手,逐步深化对故障诊断的认识: ## 1.1 交换机故障诊断的重要性 交换机作为网络的核心设备,其稳定性和性能直接影响着整个网络的运行效率。因此,准确且快速地诊断和解决交换机故障是网