You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/01/29 00:17:01 UTC
[GitHub] [incubator-tvm] hlu1 opened a new pull request #4784: [Python]
Replace os.path.exists with try...except...else
hlu1 opened a new pull request #4784: [Python] Replace os.path.exists with try...except...else
URL: https://github.com/apache/incubator-tvm/pull/4784
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`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-tvm] tqchen merged pull request #4784: [Python] Replace
os.path.exists with try...except...else
Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #4784: [Python] Replace os.path.exists with try...except...else
URL: https://github.com/apache/incubator-tvm/pull/4784
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services