Skip to content Skip to sidebar Skip to footer

Copy_tree Raises "[errno 2] No Such File Or Directory" For The Destination

I have a python service which at some point, will copy a directory from one location to another. When the service first runs, it raises an error '[Errno 2] No such file or director

Solution 1:

The problem is, you did not check file['destination'] first so because It does not exist, It cause to error raising. So beside checking is.dir(source), you should check is.dir(file['destination']) too.


Post a Comment for "Copy_tree Raises "[errno 2] No Such File Or Directory" For The Destination"