我有一個程式碼如下
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds',
'https://www.googleapis.com/auth/drive']
credentials = ServiceAccountCredentials.from_json_keyfile_name('andyto202.json', scope)
gc = gspread.authorize(credentials)
wks = gc.open("UploadByPython").sheet1
print(wks.get_all_values())
就是python連進google試算表讀出資料
在家裡測試是好的(有讀到結果)
但是在公司有下列錯誤訊息(公司要用proxy才能連出去)
錯誤訊息如下
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0606E568>: Failed to establish a new connection: [WinError 10060] 連線嘗試失敗,因為連線對象有一段時間並未正確回應,或是連線建立失敗,因為連線的主機無法回應。')': /token
請問前輩要怎麼加入proxy
謝謝