question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError during email validation

See original GitHub issue

When I am trying to validate a email, getting the below error both in python 2 and 3.

address.validate_address(‘mithun.manohar@xxxx.com’)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flanker\utils.py", line 64, in wrapper
    return_value = f(*args, **kwargs)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flanker\addresslib\address.py", line 312, in validate_address
    exchanger, mx_metrics = mail_exchanger_lookup(paddr.hostname, metrics=True)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flanker\utils.py", line 64, in wrapper
    return_value = f(*args, **kwargs)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flanker\addresslib\validate.py", line 156, in mail_exchanger_lookup
    mx_hosts = lookup_domain(domain)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flanker\addresslib\validate.py", line 210, in lookup_domain
    if len(mx_hosts) == 0:
TypeError: object of type 'filter' has no len()

Anyone faced similar issue ?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
chingccommented, Jun 19, 2020

Updating to 0.9.11 fix this issue for me.

0reactions
dineshravcommented, Oct 18, 2019

I am having the exact same issue… Can anyone help… I tried the option suggested by @amk5… still no luck

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError when using validate_email package in pandas
Based on your error message, it looks like you're importing validate_email incorrectly. Try replacing your import with:
Read more >
How to Validate Email Addresses in Python? - STechies
In this article, we'll look at various ways one can validate email addresses in Python. Regular expression; re.match method; email_validator function. What is...
Read more >
Solved: Email validation client script (easy points) - ServiceNow
my task is to verify the email format being inputted. So for some weird reason, the code works for evaluating 1 email, and...
Read more >
Jquery validation plugin - TypeError validate is not a function
The "$(...). validate is not a function" jQuery error occurs when the jQuery validation plugin is not loaded or the jQuery-related scripts are ......
Read more >
Validators — WTForms Documentation (2.3.x)
For ex: pip install wtforms[email]. Parameters. message – Error message to raise in case of a validation error. granular_messsage – Use validation failed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found