The OSError occurs when the download destination is on a different file system than the /tmp directory of the OS because pathlib.Path.rename() is used to move the file into its final destination, which throws OSError when renaming across different file systems. The change proposed here catches the exception and uses shutil.move to fix this.
The
OSError
occurs when the download destination is on a different file system than the /tmp directory of the OS because pathlib.Path.rename() is used to move the file into its final destination, which throwsOSError
when renaming across different file systems. The change proposed here catches the exception and usesshutil.move
to fix this.