Giter VIP home page Giter VIP logo

Comments (2)

BenCurtisD avatar BenCurtisD commented on May 25, 2024

Update: I identified the source of the issue,
def get_update_time(self, file_id):
"""Returns the time this file was last modified in RFC 3339 format."""
return self._execute_request(self.service.files().get(fileId=file_id, fields='modifiedTime',
supportsAllDrives=self.is_team_drive()))['modifiedTime']

self.is_team_drive() was returning False in my case, so for my version I simply replaced it with True, not entirely sure why it doesn't work but it doesn't.

from pygsheets.

BenCurtisD avatar BenCurtisD commented on May 25, 2024

bigger problem, after fixing the unlink, the link() function simply returns a httpError 500 even when nothing is changed.
destination.unlink()
destination.link()

Traceback (most recent call last):
File "D:\Documents\Github\SBFO-Kanoptima-Software\tester.py", line 10, in
html = CPIProcessor.singleCPI("AMEDOU01A", "2023-01-12", driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Documents\Github\SBFO-Kanoptima-Software\CPIProcessor.py", line 189, in singleCPI
destination.link()
File "C:\Users\ben\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygsheets\worksheet.py", line 201, in link
self.client.sheet.update_sheet_properties_request(self.spreadsheet.id, self.jsonSheet['properties'], '*')
File "C:\Users\ben\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygsheets\sheet.py", line 188, in update_sheet_properties_request
return self.batch_update(spreadsheet_id, request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ben\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygsheets\sheet.py", line 120, in batch_update
return self._execute_requests(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ben\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygsheets\sheet.py", line 496, in _execute_requests
response = request.execute(num_retries=self.retries)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ben\AppData\Local\Programs\Python\Python311\Lib\site-packages\googleapiclient_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ben\AppData\Local\Programs\Python\Python311\Lib\site-packages\googleapiclient\http.py", line 938, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 500 when requesting https://sheets.googleapis.com/v4/spreadsheets/10cHHZMd6wPWPx0m5UEomiGK5ikHJui1BfXjOPz-SBPQ:batchUpdate?fields=%2A&alt=json returned "Internal error encountered.". Details: "Internal error encountered.">

from pygsheets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.