-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Whenever I put my OpenAI API key, I get the following error (see below). I tried different API keys, but I still get the same error each time. Do you know what could be the problem ?
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 162, in script
python:
File "game/script.rpy", line 178, in <module>
messages = chatgpt.completion(messages,apikey)
Exception: Error: 401, {
"error": {
"message": "Incorrect API key provided: sk-svcac****************************************************r-IL. You can find your API key at https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 162, in script
python:
File "C:\Users\macha\Desktop\Renpy\renpy\ast.py", line 834, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Users\macha\Desktop\Renpy\renpy\python.py", line 1187, in py_exec_bytecode
exec(bytecode, globals, locals)
File "game/script.rpy", line 178, in <module>
messages = chatgpt.completion(messages,apikey)
File "python-packages/chatgpt/__init__.py", line 38, in completion
Exception: Error: 401, {
"error": {
"message": "Incorrect API key provided: sk-svcac****************************************************r-IL. You can find your API key at https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}
Windows-10-10.0.26100 AMD64
Ren'Py 8.3.7.25031702
Ren'Py Tutorial Game Ren'Py 8.3.7.25031702
Sun Jun 1 16:15:50 2025
Metadata
Metadata
Assignees
Labels
No labels