Error uploading dataset to colab

I am having issues when I try to upload my dataset. I don´t know why but when I upload just one image and label in each folder(train and val) everything works perfectly, but when I try to upload more than one image I get the next error:

Traceback (most recent call last):
File “C:\Users\Robcib\Desktop\Miguel\YOLO_Miguel\yolov5-master\utils\loggers\wandb\log_dataset.py”, line 27, in
create_dataset_artifact(opt)
File “C:\Users\Robcib\Desktop\Miguel\YOLO_Miguel\yolov5-master\utils\loggers\wandb\log_dataset.py”, line 11, in create_dataset_artifact
logger = WandbLogger(opt, None, job_type=‘Dataset Creation’) # TODO: return value unused
File “C:\Users\Robcib\Desktop\Miguel\YOLO_Miguel\yolov5-master\utils\loggers\wandb\wandb_utils.py”, line 190, in init
self.data_dict = self.check_and_upload_dataset(opt)
File “C:\Users\Robcib\Desktop\Miguel\YOLO_Miguel\yolov5-master\utils\loggers\wandb\wandb_utils.py”, line 203, in check_and_upload_dataset
config_path = self.log_dataset_artifact(opt.data,
File “C:\Users\Robcib\Desktop\Miguel\YOLO_Miguel\yolov5-master\utils\loggers\wandb\wandb_utils.py”, line 345, in log_dataset_artifact
self.train_artifact = self.create_dataset_table(LoadImagesAndLabels(
File “C:\Users\Robcib\Desktop\Miguel\YOLO_Miguel\yolov5-master\utils\loggers\wandb\wandb_utils.py”, line 428, in create_dataset_table
artifact.add(table, name)
File “C:\Users\Robcib\AppData\Local\Programs\Python\Python39\lib\site-packages\wandb\sdk\wandb_artifacts.py”, line 500, in add
val = obj.to_json(self)
File “C:\Users\Robcib\AppData\Local\Programs\Python\Python39\lib\site-packages\wandb\data_types.py”, line 610, in to_json
mapped_row.append(_json_helper(v, artifact))
File “C:\Users\Robcib\AppData\Local\Programs\Python\Python39\lib\site-packages\wandb\data_types.py”, line 105, in _json_helper
return val.to_json(artifact)
File “C:\Users\Robcib\AppData\Local\Programs\Python\Python39\lib\site-packages\wandb\sdk\data_types.py”, line 2303, in to_json
classes_entry = artifact.add(self._classes, class_name)
File “C:\Users\Robcib\AppData\Local\Programs\Python\Python39\lib\site-packages\wandb\sdk\wandb_artifacts.py”, line 520, in add
with self.new_file(name) as f:
File “C:\Users\Robcib\AppData\Local\Programs\Python\Python39\lib\contextlib.py”, line 117, in enter
return next(self.gen)
File “C:\Users\Robcib\AppData\Local\Programs\Python\Python39\lib\site-packages\wandb\sdk\wandb_artifacts.py”, line 359, in new_file
raise ValueError(
ValueError: File with name “media\classes\56699adf4321fa19e6264a528fad82c4_cls.classes.json” already exists at “C:\Users\Robcib\AppData\Local\Temp\tmph3c76g8x\media\classes\56699adf4321fa19e6264a528fad82c4_cls.classes.json”

command line: C:\Users\Robcib\Desktop\Miguel\YOLO_Miguel\yolov5-master>python utils/loggers/wandb/log_dataset.py --project custom_yolov5 --data data/custom_dataset.yaml

Hi @miguel_gd,

This seems to be an issue specific to the YOLOv5 integration with Windows. Here is a discussion about this issue, along with a solution which has seemed to work for multiple users.

Please let us know if this resolves your issue.

Thanks,
Ramit

Hi,

Just following up here. Did the above solution work for you? Please let us know if we can be of further assistance.

Thanks,
Ramit

Hi,

Yes it worked. Thank you for your answer and help.

Kind regards,