Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Error: \n #23

Open
collin-rxr2 opened this issue Dec 17, 2022 · 7 comments
Open

Error: \n #23

collin-rxr2 opened this issue Dec 17, 2022 · 7 comments

Comments

@collin-rxr2
Copy link

collin-rxr2 commented Dec 17, 2022

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!

@PancakesArchitect
Copy link

I get the exact same error, token isn't the issue.

@davghz
Copy link

davghz commented Dec 18, 2022

I have the same error. Been trying to see how to fix it all day smh.

@SilkePilon
Copy link

Traceback (most recent call last):
  File "test.py", line 11, in <module>
    print(conversation.chat("What's the color of the sky?"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\****\AppData\Local\Programs\Python\Python311\Lib\site-packages\chatgpt\chatgpt.py", line 420, in chat
    raise ChatgptError(
chatgpt.errors.ChatgptError: \n

also got the same error

@jinjamator
Copy link

Same here

@DavraYoung
Copy link

Same

@collin-rxr2
Copy link
Author

Can they maybe fix the Library instead of making a Documentation for a Library that doesn't work?

@samsap
Copy link

samsap commented Dec 27, 2022

same error here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants