Hello, I have a problem with this line of code: ti...
# general
m
Hello, I have a problem with this line of code: timegpt = TimeGPT(token=os.environ['TIMEGPT_TOKEN']) I'm using my token but I get an error:
Copy code
File ~\anaconda3\lib\os.py:680, in _Environ.__getitem__(self, key)
    677     value = self._data[self.encodekey(key)]
    678 except KeyError:
    679     # raise KeyError with the original key value
--> 680     raise KeyError(key) from None
    681 return self.decodevalue(value)
j
Hey. Seems like you haven't set your token in the env variable. You can do it before launching your script:
Copy code
TIMEGPT_TOKEN=your_token python your_script.py
or before launching jupyter:
Copy code
TIMEGPT_TOKEN=your_token jupyter lab
or inside your session
Copy code
os.environ['TIMEGPT_TOKEN'] = your_token