-
Notifications
You must be signed in to change notification settings - Fork 952
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
Unable to open the sheet. #256
Comments
What is your Python version? Did you share your spreadsheet with the email in json as the docs says? Also, try using the code from the docs: http://gspread.readthedocs.org/en/latest/oauth2.html Side note: please use code formatting in your markdown. It's not easy to read python without spaces. |
Hi burnash, I did share the client_email of my JSON file. print(sys.version) I tried 2 ways using .p12 file & .JSON file. I have pasted the .p12 file code here in this issue. I have even tried .JSON one (http://gspread.readthedocs.org/en/latest/oauth2.html) you are pointing at. I am having same problem, code is working fine but I am unable to open the sheet. Is it mandatory to have 3.x python version, is it the real cause of the problem?. I am upgrading my version, anyways. Thanks!! |
No, you should be able to run it with 2.7.6 without any problem. Do you see any other spreadsheets? Try to run |
Running fine but not opening the sheet.
|
What is a value of |
Not sure, whats the value. I think, its an object which holds gc.open("some worksheet name"). Please correct me if I am wrong!! |
Try to do a |
Thanks a ton. This the output. I have added the output as code because it Github is not accepting it.
|
This looks like gspread has fetched 2 spreadsheets, and your authorization is working properly. You can go further and print titles of these spreadsheets: for s in gc.openall():
print s.title The output will tell you what spreadsheets you have access to. |
Awesome. Exactly, when it can print why its unable to open?
New Metrics |
This is strange. Try with your "New Metrics". After you do |
Yeah, I read so many docs regarding this, ran different scripts. I have no idea why is this happening. Is it more of http related one? unable to open a sheet because of http or missing any library or a file crucial to open the file which I missed to run? This is the output for what you said. Once again, thanks for your time.
New Metrics
I got same output for print sh.sheet1 I tried
this is the output
New Metrics I also tried sh = gc.open('Hero').sheet1. Below is the output
New Metrics |
[<Worksheet 'Sheet1' id:od6>] This means that you do have a worksheet. |
I am at the end of the road, but for some reason I am stuck. Its not working for some strange reason, Any alternatives to authorize, create & print something into Google Sheets other than GSpread?. |
I don't really understand why you're saying that you stuck. You have your worksheet object, just proceed with the docs and call the required methods on it. That's about it. GData is an alternative Python client library from Google: https://github.com/google/gdata-python-client |
Its working now. Thanks a ton @burnash. gc.open() didn't work at that point, now working fine. 👍 |
@Shiva-Shinde If your issue is resolved, please close this issue. |
Code runs perfectly fine with no errors etc. But it is unable to open the sheet. Please refer the code below. Unable to figure whats wrong here. Thanks!
I tried sh=gc.open("Hero").sheet1 (didn't work either)
The text was updated successfully, but these errors were encountered: