I'm trying to tutorial of sendgrid but quickstart doesn't work in my environment.
is this due to my enviroment or bug?
I copied quick start code and executed,
https://github.com/sendgrid/sendgrid-python
this error message was shown
Traceback (most recent call last):
File "sendgrid.py", line 1, in <module>
import sendgrid
File "c:\ang\gurucho-back\modules\sendgrid.py", line 3, in <module>
from sendgrid.helpers.mail import *
ModuleNotFoundError: No module named 'sendgrid.helpers'; 'sendgrid' is not a package
if i comment out 'from sendgrid.helpers.mail import *'
this error massage was shown
Traceback (most recent call last):
File "sendgrid.py", line 1, in <module>
import sendgrid
File "c:\ang\gurucho-back\modules\sendgrid.py", line 7, in <module>
sg = sendgrid.SendGridAPIClient(apikey=SENDGRID_API_KEY)
AttributeError: module 'sendgrid' has no attribute 'SendGridAPIClient'
Hello @punisuke,
Please try the quick start here.
I have changed the default branch to v4, because that is the one under active development. But if you are using the current version, then the master branch is where you want to look.
My apologies for the confusion.
With Best Regards,
Elmer
Having the same issue with Python 3.6.4.
pip3 install sendgrid
Collecting sendgrid
Using cached https://files.pythonhosted.org/packages/24/21/9bea4c51f949497cdce11f46fd58f1a77c6fcccd926cc1bb4e14be39a5c0/sendgrid-5.6.0-py2.py3-none-any.whl
Requirement already satisfied: python-http-client>=3.0 in /usr/local/lib/python3.7/site-packages (from sendgrid) (3.1.0)
Installing collected packages: sendgrid
I tried again after uninstall sendgrid, but i have same issue.
would you give me any advice?
Hello @hasib32 @punisuke ,
Could you please run this command on your command line and tell me what version you have installed?
pip3 list | grep sendgrid*
And then, could you please provide the quick start code you are using? Thanks!
With Best Regards,
Elmer
Sorry, it's solved.
I named my sample code as "sendgrid.py", so it import itself as sendgrid module.
Thank you for kindly support
Thanks for the follow up @punisuke, I'm glad that was resolved!
How about you @hasib32, are you still having trouble?
Sorry, it's solved.
I named my sample code as "sendgrid.py", so it import itself as sendgrid module.
Thank you for kindly support
Danm I did that stupid thing too. Thank you and thank Google I found this.
Most helpful comment
Sorry, it's solved.
I named my sample code as "sendgrid.py", so it import itself as sendgrid module.
Thank you for kindly support