Issues with reading Google Sheet

What I’m trying to do:
I’m trying to access my Google Sheet using the documentation here:

I’ve added the Google API service, named it app_files.database, and given it the appropriate permissions:

When I execute the code, I get the below error. Am I missing step?

What I’ve tried and what’s not working:
I’m getting an AttributeError: ‘Spreadsheet’ object has no attribute ‘get_bytes’

Code Sample:


from anvil.google.drive import app_files

f = app_files.database
print("File contents: " + f.get_bytes())

Clone link:
share a copy of your app

Hi @koontz2k4
I see from your screenshot the file you’re trying to access is a Google Sheet.
That’s not actually a “physical file” in Google Drive.
If you try with a text file you upload to Google Drive, that should work.

1 Like

That was it. Thanks!