deivit24 / python-steam-api

MIT License
25 stars 11 forks source link

Codec issues #20

Open nihilisticzebra opened 4 months ago

nihilisticzebra commented 4 months ago

Hi I keep getting this error when i run the codes Traceback (most recent call last): File "z:\Project\steamapi.py", line 4, in KEY = config("STEAM_API_KEY") ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\decouple.py", line 246, in call self._load(self.search_path or self._caller_path()) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\decouple.py", line 236, in _load self.config = Config(Repository(filename, encoding=self.encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\decouple.py", line 151, in init for line in file: File "", line 322, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

deivit24 commented 3 months ago

@nihilisticzebra hey sorry for just seeing this. hmm can I have a little bit for detail. I am assuming you created a python env and have a .env file with your STEAM_API_KEY ?

Also since I believe you are in Windows try this command:

setx STEAM_API_KEY "your_api_key_here"