Giter VIP home page Giter VIP logo

Comments (6)

nithinmurali avatar nithinmurali commented on May 12, 2024

Please provide your Environment Info(os and python version) , and steps to reproduce . also a complete stack-trace will be helpful.

from pygsheets.

Avinash-Raj avatar Avinash-Raj commented on May 12, 2024

I'm trying to check oauth2 locally on my GAE application which runs on Ubuntu 14.04.

Full traceback..


Enter verification code: Internal Server Error: /alumni_dateycollege/sheet/
Traceback (most recent call last):
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/alumni_registration_dateycollege/views.py", line 56, in testsheet
    creat_sample_sheet()
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/alumni_registration_dateycollege/sheet_handler.py", line 7, in creat_sample_sheet
    gc = pygsheets.authorize(outh_file=client_secret_file)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/pygsheets/client.py", line 437, in authorize
    credentials = get_outh_credentials(client_secret_file=outh_file, credential_dir=outh_creds_store)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/pygsheets/client.py", line 407, in get_outh_credentials
    credentials = tools.run_flow(flow, store, flags)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/oauth2client/tools.py", line 239, in run_flow
    code = input('Enter verification code: ').strip()
EOFError: EOF when reading a line
ERROR    2016-11-29 05:44:31,412 base.py:284] Internal Server Error: /alumni_dateycollege/sheet/
Traceback (most recent call last):
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/alumni_registration_dateycollege/views.py", line 56, in testsheet
    creat_sample_sheet()
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/alumni_registration_dateycollege/sheet_handler.py", line 7, in creat_sample_sheet
    gc = pygsheets.authorize(outh_file=client_secret_file)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/pygsheets/client.py", line 437, in authorize
    credentials = get_outh_credentials(client_secret_file=outh_file, credential_dir=outh_creds_store)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/pygsheets/client.py", line 407, in get_outh_credentials
    credentials = tools.run_flow(flow, store, flags)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/gemini/.up_projects/vishudha-gae-backup/vishudha-gae-backup/lib/oauth2client/tools.py", line 239, in run_flow
    code = input('Enter verification code: ').strip()
EOFError: EOF when reading a line
INFO     2016-11-29 05:44:31,598 module.py:794] default: "GET /alumni_dateycollege/sheet/ HTTP/1.1" 500 80331

Before the traceback, I saw a link which needs to get accessed inorder to authenticate..

from pygsheets.

nithinmurali avatar nithinmurali commented on May 12, 2024

Can you try,

import pygsheets
gc = pygsheets.authorize(outh_file= <relative path to client secret file>)
ss = gc.open('<some sheet you have>')

and see if you are able to authorize

from pygsheets.

Avinash-Raj avatar Avinash-Raj commented on May 12, 2024

@nithinmurali error raised because of the above code.. Pls add a tutorial on how to link pygsheets with Google App Engine..

from pygsheets.

nithinmurali avatar nithinmurali commented on May 12, 2024

@Avinash-Raj I have no experience with Google App Engine , so wont be able to write a tutorial as of now. Are you getting the same EOFError when just running these statements?

from pygsheets.

nithinmurali avatar nithinmurali commented on May 12, 2024

added non local authorization in #26 . Which should fix this. see docs about non local authorization. Re open if the issue still persists.

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.