Skip to content

Conversation

@hlu1
Copy link
Contributor

@hlu1 hlu1 commented Jan 29, 2020

Hit this error when I was running tests on servers.

FileExistsError: [Errno 17] File exists: '.pkl_memoize_py3'

From the Python documentation of (os.path.exists())[https://docs.python.org/dev/library/os.path.html#os.path.exists], it says that there are specific cases in which a file or folder exists but os.path.exists() returns false:

Return True if path refers to an existing path or an open file descriptor. Returns False for broken symbolic links. On some platforms, this function may return False if permission is not granted to execute os.stat() on the requested file, even if the path physically exists.

The error went away after I changed it to try...except...else.

@hlu1 hlu1 requested review from tqchen and zhiics January 29, 2020 00:17
@tqchen tqchen merged commit 3827ccb into apache:master Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants