awekrx / ChatGPT-MidJourney-prompt

This is a ChatGPT based prompt generation model for MidJorney. The purpose of this model is to simplify the creation of images and increase their creativity. By introducing a partial hint, ChatGPT creates a follow-up that can be used to stimulate creativity and provide new ideas.
MIT License
336 stars 52 forks source link

Getting SSL Error #3

Closed nsonaniya2010 closed 1 year ago

nsonaniya2010 commented 1 year ago
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 411, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 428, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 472, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/Cellar/python@3.9/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 501, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/Cellar/python@3.9/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1041, in _create
    self.do_handshake()
  File "/usr/local/Cellar/python@3.9/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1310, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 573, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/csrf (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1129)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/aaaa/Tools/midjourney/midj/api.py", line 13, in <module>
    promptGenerator = PromptGenerator(config)
  File "/usr/local/lib/python3.9/site-packages/chatGPTMidJourneyPrompt/mjPrompt.py", line 21, in __init__
    self.chatbot = ChatbotV1(config)
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 58, in wrapper
    out = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 237, in __init__
    self.__check_credentials()
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 58, in wrapper
    out = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 268, in __check_credentials
    self.login()
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 58, in wrapper
    out = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 413, in login
    auth.begin()
  File "/usr/local/lib/python3.9/site-packages/OpenAIAuth.py", line 70, in begin
    response = self.session.get(
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/csrf (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1129)')))
awekrx commented 1 year ago

What happened here is that chatgpt server refuses your connection (you're sending too many requests from same ip address in short period of time) make a delay between requests

nsonaniya2010 commented 1 year ago

That was the first time i made the request.