Tutorial - "Creating Our Universe"

From the Pipeline Tutorial "Creating Our Universe" I ran the code provided without error until I ran the following:

from codeload.pipeline_tutorial.tradable_stocks import TradableStocksUS
universe = TradableStocksUS()

I then received the following error:

ModuleNotFoundError Traceback (most recent call last)
Input In [55], in <cell line: 1>()
----> 1 from codeload.pipeline_tutorial.tradable_stocks import TradableStocksUS
3 universe = TradableStocksUS()

ModuleNotFoundError: No module named 'codeload.pipeline_tutorial'

Guidance on the above would be great.


Did you clone the tutorial by running:

from quantrocket.codeload import clone

If so, the files will be installed in /codeload/pipeline_tutorial. In JupyterLab, the file explorer shows you the contents of /codeload. So you will see a pipeline_tutorial folder, inside which there will be a file called tradable_stocks.py, among other files. The contents of this file can by loaded in Python with the import statement from codeload.pipeline_tutorial.tradable_stocks import TradableStocksUS.

The error message suggests to me that you may not have installed/cloned the tutorial in the manner shown above.