fastapi-mail icon indicating copy to clipboard operation
fastapi-mail copied to clipboard

No module named 'xxx' issue

Open schuberty opened this issue 2 years ago • 1 comments

After I installed fastapi-mail 1.1.4 and set it up in my app, I started getting the following "no module found" messages when I import things related to the package, e.g.:

➜ pipenv run py
Loading .env environment variables...
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from fastapi_mail import ConnectionConfig
No module named 'aioredis'
No module named 'httpx'

I can delete my whole environment, reinstall it and it keeps coming back.

schuberty avatar Aug 12 '22 06:08 schuberty

I am getting this as well. It looks like it's coming from these two print statements in fastapi_mail/email_utils/email_check.py.

try:
    import aioredis

    redis_lib = True
except ImportError as error:
    redis_lib = False
    print(error)

try:
    import httpx

    request_lib = True
except ImportError as error:
    request_lib = False
    print(error)

Can we remove the print statements? It looks like the code is setup to optionally function without those packages by design.

Any thoughts @sabuhish? It looks like you may have worked on that part last. Thanks!!

zduvall avatar Sep 05 '22 21:09 zduvall

Any news about it?

Feijo avatar Sep 30 '22 11:09 Feijo

Changes have already been merged and released, thanks for your help guys! I will close this issue now. Please use version 1.1.5. Thanks!

sabuhish avatar Oct 02 '22 13:10 sabuhish