With web2py.exe more complete screenshot C:\Dev\web\web2py_win\web2py_2_14_06>web2py.exe -S welcome web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2017 Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 Database drivers available: psycopg2, pymysql, imaplib, MySQLdb, sqlite3, pyodbc WARNING:web2py:import IPython error; use default python shell Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> execfile( "/temp/mailtest.py", variables ) Traceback (most recent call last): File "<console>", line 1, in <module> NameError: name 'variables' is not defined >>> variables= {} >>> execfile( "/temp/mailtest.py", variables ) Traceback (most recent call last): File "<console>", line 1, in <module> File "/temp/mailtest.py", line 10, in <module> subject='Hello from python-sparkpost' File "C:\Python27\lib\site-packages\sparkpost\transmissions.py", line 254, in send results = self.request('POST', self.uri, data=json.dumps(payload)) File "C:\Python27\lib\site-packages\sparkpost\base.py", line 41, in request **kwargs) File "C:\Python27\lib\site-packages\sparkpost\base.py", line 12, in request response = self.sess.request(method, uri, headers=headers, **kwargs) File "C:\Python27\lib\site-packages\requests\sessions.py", line 513, in request resp = self.send(prep, **send_kwargs) File "C:\Python27\lib\site-packages\requests\sessions.py", line 623, in send r = adapter.send(request, **kwargs) File "C:\Python27\lib\site-packages\requests\adapters.py", line 514, in send raise SSLError(e, request=request) SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581) >>>
On Friday, June 9, 2017 at 9:48:55 AM UTC+2, icodk wrote: > > Sparkpost has simple python api: > > from sparkpost import SparkPost > sp = SparkPost('YOUR API KEY') > > response = sp.transmissions.send( > use_sandbox=True, > recipients=['some...@somedomain.com'], > html='<p>Hello world</p>', > from_email='t...@sparkpostbox.com', > subject='Hello from python-sparkpost' > ) > > print(response) > > > However I get the following error: > SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl > .c:581) > > Could be something with the python version in web2py.exe (I am useing > web2py_2_14_06) > Any idea > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.