Skip to content

unknown error (_ssl.c:3103) when using uv #15327

@S4r4h-O

Description

@S4r4h-O

Summary

Hi! I'm creating an app that needs to send emails, and this error occurs when I create the virtual environment with uv:

Internal Server Error: /signup/
Traceback (most recent call last):
  File "/home/sarah/Desktop/Python/myapp/.venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/home/sarah/Desktop/Python/myapp/.venv/lib/python3.10/site-packages/django/core/
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/sarah/Desktop/Python/myapp/.venv/lib/python3.10/site-packages/django/views
    return self.dispatch(request, *args, **kwargs)
  File "/home/sarah/Desktop/Python/myapp/.venv/lib/python3.10/site-packages/django/views
    return handler(request, *args, **kwargs)
  File "/home/sarah/Desktop/Python/myapp/.venv/lib/python3.10/site-packages/django/views
    return super().post(request, *args, **kwargs)
  File "/home/sarah/Desktop/Python/myapp/.venv/lib/python3.10/site-packages/django/views/generic/edit.py", line 151, in post
    return self.form_valid(form)
  File "/home/sarah/Desktop/Python/myapp/backend/src/userspace/views.py", line 58, in form_valid
    ssl_send_email(message, subject)
  File "/home/sarah/Desktop/Python/myapp/backend/src/backend/emailing.py", line 34, in ssl_send_email
    with smtplib.SMTP_SSL(EMAIL_HOST, EMAIL_PORT) as server:
  File "/home/sarah/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/smtplib.py", line 1047, in __init__
    context = ssl._create_stdlib_context(certfile=certfile,
  File "/home/sarah/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/ssl.py", line 806, in _create_unverified_context
    context = SSLContext(protocol)
  File "/home/sarah/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/ssl.py", line 496, in __new__
    self = _SSLContext.__new__(cls, protocol)
ssl.SSLError: unknown error (_ssl.c:3103)

However, the code is executed without issues in an environment without uv (python -m venv .venv, no uv installed in the system). I found someone else having the same issue here. Let me know if you need more info.

Platform

Fedora 42 / Arch Linux

Version

0.7.13

Python version

3.12.11 / 3.10

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions