vj57 / googlecl

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

install problem: authentication fails with inability to locate files in ~/.local/share/googlecl #352

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a small problem in the setup script maybe? The ~/.local file structure 
is not created and hence authentication fails when creating token files (or 
whatever the hell it's doing, I can't really pretend to understand). 

What steps will reproduce the problem?
1. install googlecl using python setup.py install
2. creating an alias 'google' to point at 
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/google
3. running (e.g.) google calendar today

What is the expected output? What do you see instead?
expected output would be some awesome google commandline fu

What I actually see is:

dyn-128-59-149-239:googlecl-0.9.12 mike$ google calendar today
Please specify user: mikedewar
Please log in and/or grant access via your browser at 
https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%2FFYR22nyopLnv
xD7POaiAukYcbDMJ&hd=default then hit enter.

[[ I hit enter after having granted access ]]

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/google", line 5, in <module>
    pkg_resources.run_script('googlecl==0.9.12', 'google')
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 489, in run_script
    set's ``.entries`` (if it wasn't already present).
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 1207, in run_script
    exec script_code in namespace, namespace
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/googlecl-0.9.12-py2.6.egg/EGG-INFO/scripts/google", line 839, in <module>
    main()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/googlecl-0.9.12-py2.6.egg/EGG-INFO/scripts/google", line 825, in main
    run_once(options, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/googlecl-0.9.12-py2.6.egg/EGG-INFO/scripts/google", line 605, in run_once
    authenticated = authenticate(auth_manager, options, config, section_header)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/googlecl-0.9.12-py2.6.egg/EGG-INFO/scripts/google", line 119, in authenticate
    valid_token = auth_manager.retrieve_access_token(display_name, browser)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/googlecl-0.9.12-py2.6.egg/googlecl/authentication.py", line 180, in retrieve_access_token
    self.client.current_token)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/googlecl-0.9.12-py2.6.egg/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: 
'/Users/mike/.local/share/googlecl/access_tok_mikedewar'

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

google 0.9.12
OS X 10.6.5
python 2.6
gdata-2.0.13-py2.6.egg

Please provide any additional information below.

I can fix this by creating the folder .local/share/googlecl and then everything 
seems to work fine

Original issue reported on code.google.com by mikede...@gmail.com on 25 Jan 2011 at 8:28

GoogleCodeExporter commented 9 years ago
I get this same problem on Ubuntu 10.10 on a new install of googlecl. For me 
creating the .local/share/googlecl fixes the problem as well. I am also using 
googlecl 0.9.12

Original comment by BostonVaulter on 8 Feb 2011 at 11:37

GoogleCodeExporter commented 9 years ago
same issue on ubuntu.

Original comment by abhishek...@google.com on 11 Feb 2011 at 1:37

GoogleCodeExporter commented 9 years ago
This patch (and the incoming commit) should solve the problem. Please let me 
know if it doesn't.

Original comment by tom.h.mi...@gmail.com on 14 Feb 2011 at 12:57

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r540.

Original comment by tom.h.mi...@gmail.com on 14 Feb 2011 at 12:57

GoogleCodeExporter commented 9 years ago
Issue 359 has been merged into this issue.

Original comment by tom.h.mi...@gmail.com on 14 Feb 2011 at 2:26

GoogleCodeExporter commented 9 years ago
Issue 376 has been merged into this issue.

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

GoogleCodeExporter commented 9 years ago
Issue 384 has been merged into this issue.

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