Nixtla / nixtla

TimeGPT-1: production ready pre-trained Time Series Foundation Model for forecasting and anomaly detection. Generative pretrained transformer for time series trained on over 100B data points. It's capable of accurately predicting various domains such as retail, electricity, finance, and IoT with just a few lines of code 🚀.
https://docs.nixtla.io
Other
1.91k stars 151 forks source link

How to solve KeyError: 'TIMEGPT_ TOKEN ' #99

Open yuhaoxu99 opened 10 months ago

yuhaoxu99 commented 10 months ago

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

eWizardII commented 10 months ago

Having the same issue too.

luoolu commented 8 months ago

Having the same issue too.

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

MateKristof commented 8 months ago

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()