I am going to copy the text of this answer though, because it is not the top answer on this thread, and this search result does not come up when using sendgrid, so I think my question actually does add to the community. I copy pasted the DLLS as shown in one answer here. I am not sure what the best fix is for this. This issue has to do with some DLLs in anaconda. I was able to find the answer here: Requests (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.") Error in P圜harm requesting website When I run it in the command line I use "python.exe ‘my_scirpt.py’" in the directory of my script. Response = sg.send(message) #this line throws the error This changesthe error to unknown url type: 'https%3A///v3/mail/send' This idea was based on the SO post. I also tried removing the ‘:’ with sg = SendGridAPIClient(pw,host=('')). This works in the IDE, but not in CMD, and I get the same error. I tried hard coding the host as sg = SendGridAPIClient(pw,host=''). When I run it in my spyder IDE it works great, but when run through the windows CMD i get. I have a sendgrid account set up and I can use it to send emails through python.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |