Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOError: [Errno 13] Permission denied: 'token.pickle' #172

Open
mishave opened this issue Jul 25, 2020 · 0 comments
Open

IOError: [Errno 13] Permission denied: 'token.pickle' #172

mishave opened this issue Jul 25, 2020 · 0 comments

Comments

@mishave
Copy link

@mishave mishave commented Jul 25, 2020

Expected Behavior

to print either:
print('No data found.')
else:
print('Name, Major:')

Actual Behavior

Opening in existing browser session.
Traceback (most recent call last):
  File "quickstart.py", line 55, in <module>
    main()
  File "quickstart.py", line 35, in main
    with open('token.pickle', 'wb') as token:
IOError: [Errno 13] Permission denied: 'token.pickle'

Steps to Reproduce the Problem

Following quickstart.py example:
https://developers.google.com/sheets/api/quickstart/python#troubleshooting

  1. created a new google sheet and save file
  2. clicked enable the Google Sheet API set up with default setting: desktop app - downloaded .json file and stored in the same folder as the quickstart.py
  3. ran 'sudo pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib'
Found existing installation: google-auth-httplib2 0.0.3
    Uninstalling google-auth-httplib2-0.0.3:
      Successfully uninstalled google-auth-httplib2-0.0.3
  Found existing installation: google-api-python-client 1.7.9
    Uninstalling google-api-python-client-1.7.9:
      Successfully uninstalled google-api-python-client-1.7.9
  Found existing installation: google-auth-oauthlib 0.4.0
    Uninstalling google-auth-oauthlib-0.4.0:
      Successfully uninstalled google-auth-oauthlib-0.4.0
Successfully installed google-api-python-client-1.10.0 google-auth-httplib2-0.0.4 google-auth-oauthlib-0.4.1
  1. changed quickstart.py Sheet ID to match that of my sheet I had set up
  2. run 'python quickstart.py'
  3. pops up a window to authorise
  4. choose user and click authorise
  5. returned to screen and throws the error:
Traceback (most recent call last):
  File "quickstart.py", line 55, in <module>
    main()
  File "quickstart.py", line 35, in main
    with open('token.pickle', 'wb') as token:
IOError: [Errno 13] Permission denied: 'token.pickle'

Specifications

  • Python version (Python 2.7.16)
  • OS:
    PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="10"
    VERSION="10 (buster)"
    VERSION_CODENAME=buster
    ID=raspbian
    ID_LIKE=debian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant