vj57 / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Error storing auth token if ~/.local isn't there #376

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. rm -rf $HOME/.local
2. google docs list
3. auth a new user

What is the expected output? What do you see instead?

It should work. Ie. in the case above, it should show the docs list.

What version of the product are you using? On what operating system? What
version of gdata-python-client (aka python-gdata)?

googlecl_0.9.12-1_all.deb

Please provide any additional information below.

--($ ~)-- env BROWSER=/bin/echo google docs list
Please specify user: a.skwar@gmail.com
https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4×××&hd=defau
lt
Please log in and/or grant access at 
https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4×××&hd=defau
lt

Please enter the verification code on the success page: ××× 
Traceback (most recent call last):
  File "/usr/bin/google", line 839, in <module>
    main()
  File "/usr/bin/google", line 825, in main
    run_once(options, args)
  File "/usr/bin/google", line 605, in run_once
    authenticated = authenticate(auth_manager, options, config, section_header)
  File "/usr/bin/google", line 119, in authenticate
    valid_token = auth_manager.retrieve_access_token(display_name, browser)
  File "/usr/lib/pymodules/python2.6/googlecl/authentication.py", line 180, in retrieve_access_token
    self.client.current_token)
  File "/usr/lib/pymodules/python2.6/googlecl/authentication.py", line 255, in write_access_token
    with open(self.tokens_path, 'wb') as tokens_file:
IOError: [Errno 2] No such file or directory: 
'/home/i/.local/share/googlecl/access_tok_a.skwar@gmail.com'

Original issue reported on code.google.com by a.skwar on 11 Mar 2011 at 2:55

GoogleCodeExporter commented 9 years ago
Yeah, I am hitting this on Ubuntu 10.10.

I had just installed googlecl 0.9.12-1 from the .deb for the first time, and I 
got this error when attempting to run my first command: "google list calendar"

Pretty confusing result. I wondered what  was doing wrong, and couldn't find 
any documentation about what to expect during the authentication. Was I 
supposed to copy the "oauth_token" and put it in the file it was complaining 
about? Apparently not... it's just a bug?

To workaround I ran this and then reauthenticated: mkdir -p 
~/.local/share/googlecl

Original comment by fja...@gmail.com on 16 Mar 2011 at 12:38

GoogleCodeExporter commented 9 years ago
This is a duplicate of Issue 352, which contains a patch to fix the problem.

Since this is the third or fourth time this issue has been mentioned, I'll 
leave this issue open until a new version is released. But to fix the problem, 
you can either create the ~/.local/share/googlecl directory, or apply the patch 
in Issue 352.

Original comment by tom.h.mi...@gmail.com on 17 Mar 2011 at 1:12

GoogleCodeExporter commented 9 years ago
Having the same issue, even with the patch applied and creating the directory 
manually ...

Original comment by jferm...@gmail.com on 22 Mar 2011 at 1:18

GoogleCodeExporter commented 9 years ago
Are you sure the patch has been applied correctly? You could also try checking 
out the repository and using the version there.

Original comment by tom.h.mi...@gmail.com on 31 Mar 2011 at 2:16

GoogleCodeExporter commented 9 years ago
With 0.9.13 out, this problem should be fixed for good. If the problem still 
persists after upgrading (and being sure you've wiped out the previous 
version), don't hesitate to comment further on this issue.

Original comment by tom.h.mi...@gmail.com on 1 Apr 2011 at 1:19

GoogleCodeExporter commented 9 years ago
I am having this issue and thought by upgrading to all the latest versions of 
Python, googlecl, java, etc. I would be able to reset the token.  I've attached 
a log I kept to show my dilema. Help!

Original comment by mthollyi...@gmail.com on 7 Jan 2015 at 4:26

Attachments: