Browse Source

http backoff client

vnc-console 7 months ago
parent
commit
f72d6207d7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      receipt.py

+ 2 - 2
receipt.py

@@ -9,7 +9,7 @@ import pypdf
 import gspread
 import requests
 import xlsxwriter
-from gspread.client import BackoffClient
+from gspread import BackOffHTTPClient
 from google.oauth2.service_account import Credentials
 from requests.adapters import HTTPAdapter
 from pypdf.errors import PdfReadError
@@ -252,7 +252,7 @@ class Receipts(object):
                  'https://www.googleapis.com/auth/drive']
         # creds = ServiceAccountCredentials.from_json_keyfile_name(json_name, scope)
         creds = Credentials.from_service_account_file(json_name, scopes=scope)
-        gsheet = gspread.authorize(creds, client_factory=BackoffClient)
+        gsheet = gspread.authorize(creds, http_client=BackOffHTTPClient)
         self.sheet = gsheet.open(g_sheet_name).sheet1
         # return sheet