nixtla icon indicating copy to clipboard operation
nixtla copied to clipboard

How to solve KeyError: 'TIMEGPT_ TOKEN '

Open yuhaoxu99 opened this issue 2 years ago • 3 comments

When I follow the steps of readme, KeyError: 'TIMEGPT_TOKEN' bug will appear. Please can you tell me how can I solve it?

yuhaoxu99 avatar Sep 02 '23 06:09 yuhaoxu99

Having the same issue too.

eWizardII avatar Sep 03 '23 03:09 eWizardII

Having the same issue too.

File "/usr/lib/python3.9/os.py", line 679, in getitem raise KeyError(key) from None KeyError: 'z7YUzeRn0Edu6jfUBKn.......'

luoolu avatar Oct 15 '23 10:10 luoolu

You should create an .env file in the project directory and paste the API key into it. As seen here: image Then install python dotenv.

pip install python-dotenv

And use this lines in your main file to load environment:

from dotenv import load_dotenv
load_dotenv()

MateKristof avatar Oct 28 '23 16:10 MateKristof

@yuhaoxu99 See this page for how to set up the API key

elephaint avatar Jul 30 '24 20:07 elephaint