YOLO: Dataset error, or the model file isn't found
- YOLO
- Ultralytics
You may see
Why it happens
- The path in data.yaml or the program is wrong for this computer.
- The weights file (best.pt) is in another folder.
How to fix it
- Use the full path to data.yaml.
- Open it and check train and val point to real folders.
- Look in
runs/detect/train…/weights/best.ptfor your model. - Run
print(os.path.exists(path)).
It worked if: Training starts and shows the number of pictures found.
Related errors
Tutorials where it can happen
Seen in a real run (some lines are close variants of it). Produced with Ultralytics 8.3.163.
Didn't help? Search another error or ask us.

