Hi @AndersenHuang,
Thank you for contacting Databricks community support.
The error message you're encountering suggests that there's a permission issue when trying to copy the files. It's possible that the permissions for the directory /dbfs/FileStore/Prod/temp/model2/
have changed, or that there's been an update to the shutil
library or the way it interacts with the DBFS file system.
One possible solution is to use the dbutils.fs.cp
command instead of shutil.copytree
to copy the files. dbutils.fs.cp
is a Databricks utility function that can be used to copy files within the DBFS file system. Here's an example of how you could modify your code to use dbutils.fs.cp
:
1dbutils.fs.cp("/dbfs/FileStore/Prod/temp/model2/model-last/config.cfg", "/dbfs/FileStore/Prod/temp/model2/model-best/config.cfg")
Another possible solution is to check the permissions of the directory /dbfs/FileStore/Prod/temp/model2/
and make sure that the user running the notebook has the necessary permissions to read and write to the directory.
It's also possible that there's been an update to the shutil
library or the way it interacts with the DBFS file system that's causing the issue. You could try using an older version of the shutil
library to see if that resolves the issue.
Finally, it's worth noting that the error message you're encountering is not specific to Spacy, but rather to the shutil
library and the way it interacts with the DBFS file system. Therefore, the solution to this issue may not be specific to Spacy either.