Hello rkjreet,
Do you have Metashape project saved by the script in C:/Users/ folder?
During the processing Metashape is saving intermediate processing files in project.files directory, so make sure that the project is saved under the valid path and that the current user account has read/write access rights to that location. Also I suggest to disable any file indexing and data synchronization services for the project folder location, as those services could affect the process of project files being written to the folder.