Pipeline #37652 has failed for master in stage prepare index

I forked a directory in order to make changes on the master branch and then create a merge request. The problem is that every time I try to do a simple task I get the above error. For example I deleted a file named test.md and a folder named .ipynb_checkpoints. I did a git add, a git commit -m ‘delete test file’ and a git push. I received an email telling me that the pipeline has failed at the prepare index stage, but paradoxically the file and folder was deleted on the remote repository: which means I managed to do the task I wanted to do. I’m confused.

and when I click on the error I get this:

Running with gitlab-runner 13.8.0 (775dd39d)
  on os-gitlab-runner-06 14e2913e
Preparing the "docker" executor
00:01
Using Docker executor with image python ...
Pulling docker image python ...
Using docker image sha256:2a93c239d591553ed9c25ef20ed7c7a1542e8644f57d352e3a1446f0a5f0412d for python with digest python@sha256:ca8bd3c91af8b12c2d042ade99f7c8f578a9f80a0dbbd12ed261eeba96dd632f ...
Preparing environment
00:01
Running on runner-14e2913e-project-2039-concurrent-0 via os-gitlab-runner-06...
Getting source from Git repository
00:03
Fetching changes...
Reinitialized existing Git repository in /builds/nene.barry/howto-cards-internal/.git/
Checking out 8f4ff728 as master...
Removing .tmp/
Skipping Git submodules setup
Downloading artifacts
00:01
Downloading artifacts for clone (234746)...
Downloading artifacts from coordinator... ok        id=234746 responseStatus=200 OK token=BZcLj-Y7
Executing "step_script" stage of the job script
00:04
$ pip install natsort
Collecting natsort
  Downloading natsort-7.1.1-py3-none-any.whl (35 kB)
Installing collected packages: natsort
Successfully installed natsort-7.1.1
$ cp -r .tmp/policies .
cp: cannot stat '.tmp/policies': No such file or directory
Cleaning up file based variables
00:00
ERROR: Job failed: exit code 1

Any help to undestand this and fix it please?