The error happens when you use Path.rename to move a file between incompatible storage layers, for example from a local file system to a Databricks volume. In that case, Databricks will fail with an exception like:
OSError: [Errno 18] Invalid cross-device link: 'unzipped_files/readers.csv' -> '/Volumes/wfc/tests/output_for_csvs/readers.csv'
To resolve this incompatiiblity issue, you should use shutil.move which is a cross-device operation compared to te Path.rename.