grahams / textexpander

Various utility scripts/snippets for TextExpander
MIT License
26 stars 3 forks source link

SSL Error #1

Closed jothirams closed 10 years ago

jothirams commented 10 years ago

Hello,

I used googl.shortner.py and I get the following error

link = api.shorten("%clipboard")

File "/Library/Python/2.7/site-packages/python_googl-0.2.1-py2.7.egg/googl/init.py", line 42, in shorten return self._request(method="POST", body=body, headers=headers, userip=userip) File "/Library/Python/2.7/site-packages/python_googl-0.2.1-py2.7.egg/googl/init.py", line 36, in _request return json.loads(self.conn.request(url, method, body=body, headers=headers)[1]) File "/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 1570, in request (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) File "/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 1317, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 1252, in _conn_request conn.connect() File "/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 1021, in connect self.disable_ssl_certificate_validation, self.ca_certs) File "/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 80, in _ssl_wrap_socket cert_reqs=cert_reqs, ca_certs=ca_certs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 387, in wrap_socket ciphers=ciphers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 141, in init ciphers) ssl.SSLError: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib

Any thoughts?

grahams commented 10 years ago

The python-googl package is probably broken, Google has their own API package nowadays and I doubt the older, unofficial one is getting much attention. If I had to guess without putting much effort in yet, I'd guess that they deprecated the older "api key" auth mechanism for OAuth.

To be honest I don't really use this snippet anymore. I'll try and take a look at it in the near future to see if I can rewrite it using the official Google package.

grahams commented 10 years ago

The latest version should fix things. Note the comments at the top of the script, you'll need to install the official google client API lib.