I have tried both:
shutil.copy(SOURCE, TRAINING) & shutil.copy(os.path.join(SOURCE, TRAINING)) and I get the error
“Error occurred while copying file.” - my code below. Any help is appreciated.
for image in training_images:
try:
shutil.copy(os.path.join(SOURCE, TRAINING))
print(“File copied successfully.”)
except:
print(“Error occurred while copying file.”)for image in testing_images: try: shutil.copy(os.path.join(SOURCE, TESTING)) print("File copied successfully.") except: print("Error occurred while copying file.")