YOLO: Dataset error, or the model file isn't found

  • YOLO
  • Ultralytics

You may see

RuntimeError: Dataset 'nope.yaml' error
'nope.yaml' does not exist
FileNotFoundError: [Errno 2] No such file or directory: 'nope.pt'
Dataset images not found, missing path

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

  1. Use the full path to data.yaml.
  2. Open it and check train and val point to real folders.
  3. Look in runs/detect/train…/weights/best.pt for your model.
  4. Run print(os.path.exists(path)).

It worked if: Training starts and shows the number of pictures found.

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.