Fix DirEntry path
Even if there's no absolute path, it has to work well. but in my case, it didn't work with the following next error occurs.datasets/download/streaming_download_manager.py, line 482, in xopen FileNotFoundError: [Errno 2] No such file or directory: "<DirEntry...
I think it's the error of the ambiguity of the relative path. After putting this change, works fine.
Even if there's no absolute path, it has to work well. but in my case, it didn't work with the following next error occurs.datasets/download/streaming_download_manager.py, line 482, in xopen FileNotFoundError: [Errno 2] No such file or directory: "<DirEntry...
I think it's the error of the ambiguity of the relative path. After putting this change, works fine.
@DevWorld , thanks for having spotted the bug and having proposed a fix!
Maybe you could implement a simpler fix by using the .path
attribute instead:
with open(filepath.path, encoding="utf-8") as f:
Thank you for your confirmation!
This may not be a bug, but a problem with TPU VM's environment.
I am not sure this problem occurs in other environments, too.
By the way, os.path.abspath(filepath)
will be might better for the absolute path.
Thanks.