Forums

GSpread - Network is Unreachable

scope = ['https://spreadsheets.google.com/feeds'] creds = ServiceAccountCredentials.from_json_keyfile_name('NFL Redraft-e021dc0d5969.json', scope) client = gspread.authorize(creds)

This code is yielding the following error: enter image description here

Any idea why? The exact same is working on my local machine, and I previously got a similar (if not exact) deployment as this to work a month ago.

It does look like that code isn't picking up the proxy server correctly. Maybe try and upgrade the dependencies? Possibly using a virtualenv?

Dependencies are all up to date. What advantage would a virtualenv have?

A virtualenv would be a good way to make sure that all dependencies are exactly as you think they should be (just in case one of our system-wide modules was old and incompatible with something you're using). What version of the gspread module are you using? It looks like 0.6.2, released last December, uses requests and so should work fine on our system -- but your stack trace suggests it's using httplib2.