COURSE NAME: Getting Market Data, SECTION: 8, Unit 1. Unit type: notebook

Hello, I am trying to import get_fed_api from the from the FMDA_quantra module. I have downloaded the FMDA_quantra.py file and added FRED API key manually, however I am getting en error:

ModuleNotFoundError: No module named 'data_modules' 

when calling from data_modules.FMDA_quantra import get_fred_api.

Please could you let me know how to fix this? I have attached a screenshot of the code. Thanks!

Hello,



This error usually arises when the folder structure is not in the same manner as we have mentioned when we retrieve the functions or data files.



I believe that if you download the zip file from the last section of the course, ie Section 12, Unit 2. And then run the notebook, this error shall not arise.



But I think you might have to copy paste your own custom api key in the util file again. By the way, the api key should be pasted only in line 73 of the py file (as seen in your screenshot).



For example, if my FRED api key is "12345abcd" I would modify the code as follows in the "FMDA_quantra.py" file.




API key to access simfin

def get_simfin_api_key():

    # Get simfin API keys

    api_key= "12345abcd"

    if api_key=="Copy your simfin API key here":

        return print("Your API key is missing.")

    else:

        return api_key



This should hopefully work.