This repository was archived by the owner on Jan 25, 2023. It is now read-only.
generated from labteral/python-package
- Notifications
You must be signed in to change notification settings - Fork 76
This repository was archived by the owner on Jan 25, 2023. It is now read-only.
Error: \n #23
Copy link
Copy link
Open
Description
Hey, I am trying to ask ChatGPT something but I get an Error everytime.
My Code is:
from chatgpt import Conversation convo = Conversation(access_token="INSERT API TOKEN HERE") print("> Design a a Blog in HTML") try: print(convo.chat("Design a Blog in HTML")) except Exception as error: message = error.message code = error.code print(f"Error Code {code} \nMessage: \n{error.message}")(btw I put an API Token from https://beta.openai.com/account/api-keys there)
And my Output is
Error Code ChatgptErrorCodes.UNKNOWN_ERROR Message: \n I dont really get why the Error Message is "\n" and if I run it without the try/except statement, I get following Error.
> Design a a Blog in HTML Traceback (most recent call last): File "c:\Users\Collin\OneDrive\Desktop\chatgpt-bot\main.py", line 6, in <module> print(convo.chat("Design a Blog in HTML")) File "C:\Users\Collin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\chatgpt\chatgpt.py", line 420, in chat raise ChatgptError( chatgpt.errors.ChatgptError: \n Any help would be appreciated!
Metadata
Metadata
Assignees
Labels
No labels