Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
143 views
in Technique[技术] by (71.8m points)

python - py3-validate-email linux 'module' object is not callable

package https://pypi.org/project/py3-validate-email/ on fedora 33 linux gives following output

[name@localhost ~]$ python email.py
Traceback (most recent call last):
  File "/home/name/email.py", line 1, in <module>
    from validate_email import validate_email
  File "/home/name/.local/lib/python3.9/site-packages/validate_email/__init__.py", line 1, in <module>
    from .validate_email import validate_email, validate_email_or_fail  # NOQA
  File "/home/name/.local/lib/python3.9/site-packages/validate_email/validate_email.py", line 4, in <module>
    from .domainlist_check import domainlist_check
  File "/home/name/.local/lib/python3.9/site-packages/validate_email/domainlist_check.py", line 8, in <module>
    from .updater import (
  File "/home/name/.local/lib/python3.9/site-packages/validate_email/updater.py", line 1, in <module>
    from http.client import HTTPResponse
  File "/usr/lib64/python3.9/http/client.py", line 71, in <module>
    import email.parser
  File "/home/name/email.py", line 2, in <module>
    is_valid = validate_email(email_address='[email protected]', check_regex=True, check_mx=True)
TypeError: 'module' object is not callable

code

from validate_email import validate_email
is_valid = validate_email(email_address='[email protected]', check_regex=True, check_mx=True, from_address='[email protected]', helo_host='my.host.name', smtp_timeout=10, dns_timeout=10, use_blacklist=True, debug=False)

could it be due to python 3.9? what could be missing? on windows it works well

question from:https://stackoverflow.com/questions/65851265/py3-validate-email-linux-module-object-is-not-callable

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...