ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

[BUG] Error... Logging in again 「An error will be reported when the proxy parameter is added」

Open Liu-Angelo opened this issue 2 years ago • 13 comments

image

Liu-Angelo avatar Feb 12 '23 15:02 Liu-Angelo

can you debug by printing error code?

acheong08 avatar Feb 12 '23 15:02 acheong08

status code

acheong08 avatar Feb 12 '23 15:02 acheong08

I have the same error using the latest version.

jevenzh avatar Feb 12 '23 15:02 jevenzh

image

acheong08 avatar Feb 12 '23 15:02 acheong08

thanks! mine was resolved after adding the proxy.

jevenzh avatar Feb 12 '23 15:02 jevenzh

@jevenzh what should i send to parameter proxy? thank you

chatbot = Chatbot(email="", password="", proxy="")

antongolubev5 avatar Feb 12 '23 15:02 antongolubev5

socks5://IP:PORT

acheong08 avatar Feb 12 '23 17:02 acheong08

--insecure-auth auto selects a proxy

acheong08 avatar Feb 12 '23 17:02 acheong08

@acheong08

PS C:\Users\anton\PycharmProjects\Targeted-SA-Application> python -m revChatGPT.V2 -e "" -p "" --insecure-auth

    ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
    Repo: github.com/acheong08/ChatGPT

Logging in... Logged in

Type '!help' to show a full list of commands Press enter twice to submit your question.

You: hello how are u

ChatGPT: Traceback (most recent call last): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\revChatGPT\V2.py", line 325, in asyncio.run(main()) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\revChatGPT\V2.py", line 315, in main result = line["choices"][0]["text"].replace("<|im_end|>", "")

TypeError: string indices must be integers

antongolubev5 avatar Feb 12 '23 17:02 antongolubev5

Can you print the full line?

acheong08 avatar Feb 13 '23 00:02 acheong08

Also try upgrading: pip3 install --upgrade revChatGPT

acheong08 avatar Feb 13 '23 00:02 acheong08

@acheong08 after updating to revChatGPT-2.1.11 i have a new error:

ChatGPT: error: OpenAI error! Traceback (most recent call last): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\revChatGPT\V2.py", line 334, in asyncio.run(main()) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\revChatGPT\V2.py", line 323, in main async for line in chatbot.ask(prompt=prompt): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\revChatGPT\V2.py", line 164, in ask raise Exception("OpenAI error!") Exception: OpenAI error! Fatal error on SSL transport protocol: <asyncio.sslproto.SSLProtocol object at 0x000001D373CDA520> transport: <_ProactorSocketTransport fd=1472 read=<_OverlappedFuture cancelled>> Traceback (most recent call last): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog self._transport.write(chunk) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 359, in write self._loop_writing(data=bytes(data)) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing self._write_fut = self._loop._proactor.send(self._sock, data) AttributeError: 'NoneType' object has no attribute 'send' Exception ignored in: <function _SSLProtocolTransport.del at 0x000001D34CEA3CA0> Traceback (most recent call last): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 321, in del File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 316, in close File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 598, in _write_appdata File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 720, in _fatal_error File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 151, in _force_close File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 746, in call_soon File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 510, in _check_closed RuntimeError: Event loop is closed

antongolubev5 avatar Feb 13 '23 05:02 antongolubev5

@acheong08 after updating to revChatGPT-2.1.11 i have a new error:

ChatGPT: error: OpenAI error! Traceback (most recent call last): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\revChatGPT\V2.py", line 334, in asyncio.run(main()) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\revChatGPT\V2.py", line 323, in main async for line in chatbot.ask(prompt=prompt): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\revChatGPT\V2.py", line 164, in ask raise Exception("OpenAI error!") Exception: OpenAI error! Fatal error on SSL transport protocol: <asyncio.sslproto.SSLProtocol object at 0x000001D373CDA520> transport: <_ProactorSocketTransport fd=1472 read=<_OverlappedFuture cancelled>> Traceback (most recent call last): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog self._transport.write(chunk) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 359, in write self._loop_writing(data=bytes(data)) File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing self._write_fut = self._loop._proactor.send(self._sock, data) AttributeError: 'NoneType' object has no attribute 'send' Exception ignored in: <function _SSLProtocolTransport.del at 0x000001D34CEA3CA0> Traceback (most recent call last): File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 321, in del File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 316, in close File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 598, in _write_appdata File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 720, in _fatal_error File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 151, in _force_close File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 746, in call_soon File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 510, in _check_closed RuntimeError: Event loop is closed

Have the same error after upgrading to 2.1.13. But will have the same error as in this issue if using 2.1.11

Jun-jie-Huang avatar Feb 13 '23 09:02 Jun-jie-Huang