Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine source of SSL Error #1

Open
Burhan-Q opened this issue Oct 12, 2023 · 3 comments
Open

Determine source of SSL Error #1

Burhan-Q opened this issue Oct 12, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Burhan-Q
Copy link
Owner

During testing, ran into this error:

urllib3.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:2396)
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\requests\adapters.py", line 486, in send
    resp = conn.urlopen(
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
    retries = retries.increment(
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\urllib3\util\retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='test.ultralytics.com', port=443): Max retries exceeded with url: /detect (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\discord\client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "Ultralytics_DiscordBot\src\UltralyticsBot.py", line 157, in on_message
    response = requests.post(request_url, json=req_dict)
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\requests\api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\requests\sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "Ultralytics_DiscordBot\.discord\lib\site-packages\requests\adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='test.ultralytics.com', port=443): Max retries exceeded with url: /detect (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)')))
@Burhan-Q
Copy link
Owner Author

  • Source may be due to requests maximum limit.
  • Additionally found a reported python3.10 issue
  • Lots of sources point to this Stack Exchange discussion on the topic as well

@Burhan-Q Burhan-Q self-assigned this Oct 12, 2023
@Burhan-Q Burhan-Q added the bug Something isn't working label Oct 12, 2023
@Burhan-Q
Copy link
Owner Author

Additional testing found that some image links were not providing usable data for requests. These links appeared to be okay, but were not actually working. Inference API returned status code 500.

@Burhan-Q
Copy link
Owner Author

Seems to be primarily related to image data being over limit of 2.0 MB. Working on compression and/or resizing of images prior to sending for inference. @kalenmike also updated response message to report back on failed inference request that image was too large.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant