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

AttributeError: module 'dns' has no attribute 'resolver' #139

Open
Olegt0rr opened this issue May 1, 2024 · 2 comments
Open

AttributeError: module 'dns' has no attribute 'resolver' #139

Olegt0rr opened this issue May 1, 2024 · 2 comments

Comments

@Olegt0rr
Copy link

Olegt0rr commented May 1, 2024

2024-05-01 14:07:56,859 -   49: app.handlers.error_handlers.basic_errors - ERROR - ERROR! Traceback (most recent call last):

  File "/Users/t0rr/Library/Caches/pypoetry/virtualenvs/true_mafia_game-_4o18Ra--py3.11/lib/python3.11/site-packages/aiogram/dispatcher/filters/builtin.py", line 583, in check
    raise exception

  File "/Users/t0rr/Library/Caches/pypoetry/virtualenvs/true_mafia_game-_4o18Ra--py3.11/lib/python3.11/site-packages/aiogram/dispatcher/dispatcher.py", line 1397, in process_response
    response = task.result()
               ^^^^^^^^^^^^^

  File "/Users/t0rr/PycharmProjects/TrueMafia/app/handlers/misc_handlers/email_handler.py", line 30, in handle_email
    valid = validate_email(email)
            ^^^^^^^^^^^^^^^^^^^^^

  File "/Users/t0rr/Library/Caches/pypoetry/virtualenvs/true_mafia_game-_4o18Ra--py3.11/lib/python3.11/site-packages/email_validator/validate_email.py", line 140, in validate_email
    deliverability_info = validate_email_deliverability(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/t0rr/Library/Caches/pypoetry/virtualenvs/true_mafia_game-_4o18Ra--py3.11/lib/python3.11/site-packages/email_validator/deliverability.py", line 32, in validate_email_deliverability
    dns_resolver = dns.resolver.get_default_resolver()
                   ^^^^^^^^^^^^

AttributeError: module 'dns' has no attribute 'resolver'
NoneType: None
@JoshData
Copy link
Owner

JoshData commented May 1, 2024

I think something must be wrong with your environment or another package is conflicting with the dnspython package required by email-validator.

@sai8151
Copy link

sai8151 commented May 3, 2024

  • Try updating packages
  • if didn't resolve reinstall everything

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

No branches or pull requests

3 participants