pytorch
27e5299e - [DataPipe] Fix mishandling of exception message when error is not iterable (#84676)

Commit
2 years ago
[DataPipe] Fix mishandling of exception message when error is not iterable (#84676) We sometimes get an exception message like this: ``` This exception is thrown by __iter__ of TarArchiveLoaderIterDataPipe(datapipe=FileOpenerIterDataPipe, length=-1, mode='r:') elif msg not in e.args[0] and single_iterator_msg not in e.args[0]: TypeError: argument of type 'int' is not iterable ``` The `TypeError` raised by the mishandling of the error message obfuscates the true exception, which now will be show as: ``` FileNotFoundError: [Errno 2] No such file or directory: ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/84676 Approved by: https://github.com/ejguan
Author
Committer
Parents
Loading