Moonshot and Zipline "mv: cannot stat 'winners.py': No such file or directory"

In both the Moonshot and Zipline strategy templates I've gotten to the below code cell:

make directory if doesn't exist

!mkdir -p /codeload/zipline
!mv winners.py /codeload/zipline/

And I've received the same error:
"mv: cannot stat 'winners.py': No such file or directory"

I can see the files exist in my Docker instance. I also see a similar issue was experienced by another user and the advice from Brian was to "Try re-downloading the Compose file from the website."

Is the "Compose file" from Dockers website or QuantRocket? Any guidance about where specifically it can be found would be fantastic.

Thank you.

Are you running this inside JupyterLab? You want it to look like this:

The Compose file is what you downloaded from the QuantRocket website during this installation step:

curl 'https://www.quantrocket.com/composefiles/latest/local/docker-compose.yml' -o docker-compose.yml

But I doubt that's the issue unless you modified the file somehow.

Yes, I am running it inside of the JupyterLab and I don't believe I modified the file.

The command uses a relative path and is intended to be run from a notebook that's in the same directory as winners.py. The error is occurring because you are running the command in a notebook that's in a different directory. To make it work, change the relative path to an absolute path:

!mv /codeload/intro_zipline/winners.py /codeload/zipline/
1 Like

Boom, that fixed it! I have no idea why it was following a relative path, I don't believe I changed any of the code. Thanks for your help, I'm very excited to get started with QuantRocket.