salimoha / googlecl

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

ValueError "insecure string pickle" on Windows #204

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

python.exe google youtube list

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

Output error:

Traceback (most recent call last):
  File "google", line 536, in <module>
    main()
  File "google", line 530, in main
    run_once(options, args)
  File "google", line 364, in run_once
    token = googlecl.read_access_token(service, client.email)
  File "C:\Python26\lib\site-packages\googlecl\__init__.py", line 160, in read_access_token
    token_dict = pickle.load(token_file)
  File "C:\Python26\lib\pickle.py", line 1370, in load
    return Unpickler(file).load()
  File "C:\Python26\lib\pickle.py", line 858, in load
    dispatch[key](self)
  File "C:\Python26\lib\pickle.py", line 966, in load_string
    raise ValueError, "insecure string pickle"
ValueError: insecure string pickle

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

googlecl 0.9.8
python 2.6.5
gdata 2.0.10

installed on Windows XP SP3

Please provide any additional information below.

This task worked correctly on prev 0.9.7 version

Original issue reported on code.google.com by spv60582 on 2 Jul 2010 at 8:34

GoogleCodeExporter commented 9 years ago
I am also getting this error in Win7, googlecl-0.9.8, gdata-2.0.10, Python26, 
upon entering username:

X:\google\googlecl-0.9.8>google calendar add
Please specify user: xxxxx
Traceback (most recent call last):
  File "google", line 536, in <module>
  File "google", line 530, in main
  File "google", line 364, in run_once
  File "googlecl\__init__.pyo", line 160, in read_access_token
  File "pickle.pyo", line 1370, in load
  File "pickle.pyo", line 858, in load
  File "pickle.pyo", line 966, in load_string
ValueError: insecure string pickle

X:\google\googlecl-0.9.8>google
> calendar add "Nate- karate Monday at 6pm"
Please specify user: bkbelton
Traceback (most recent call last):
  File "google", line 278, in run_interactive
  File "google", line 364, in run_once
  File "googlecl\__init__.pyo", line 160, in read_access_token
  File "pickle.pyo", line 1370, in load
  File "pickle.pyo", line 858, in load
  File "pickle.pyo", line 966, in load_string
ValueError: insecure string pickle
>

bkbelton@gmail.com

Original comment by bkbel...@gmail.com on 2 Jul 2010 at 12:58

GoogleCodeExporter commented 9 years ago
Same issue, Vista, python 2.5.2, googlecl-0.9.8, gdata-2.0.10

Traceback (most recent call last):
  File "C:\Python25\googlecl-0.9.8\src\google", line 536, in <module>
    main()
  File "C:\Python25\googlecl-0.9.8\src\google", line 530, in main
    run_once(options, args)
  File "C:\Python25\googlecl-0.9.8\src\google", line 364, in run_once
    token = googlecl.read_access_token(service, client.email)
  File "C:\Python25\googlecl-0.9.8\src\googlecl\__init__.py", line 160, in read
access_token
    token_dict = pickle.load(token_file)
  File "c:\Python25\lib\pickle.py", line 1370, in load
    return Unpickler(file).load()
  File "c:\Python25\lib\pickle.py", line 858, in load
    dispatch[key](self)
  File "c:\Python25\lib\pickle.py", line 966, in load_string
    raise ValueError, "insecure string pickle"
ValueError: insecure string pickle

Original comment by Steven.S...@gmail.com on 5 Jul 2010 at 10:15

GoogleCodeExporter commented 9 years ago
By any chance, have any of you moved the access token files to your machine 
from another computer?

What about keeping the same access token files from 0.9.7 to 0.9.8? That should 
be OK, but maybe not for Windows users.

Original comment by tom.h.mi...@gmail.com on 20 Jul 2010 at 8:24

GoogleCodeExporter commented 9 years ago
I am also seeing this error.
Have not moved or changed access token files since googlecl 0.9.7
Windows 7, Python 2.6.5, googlecl 0.9.9, gdata 2.0.11 final

C:\Python\Scripts>google docs upload PATHNAME
Traceback (most recent call last):
  File "google", line 577, in <module>
  File "google", line 571, in main
  File "google", line 374, in run_once
  File "googlecl\__init__.pyo", line 176, in read_access_token
  File "pickle.pyo", line 1370, in load
  File "pickle.pyo", line 858, in load
  File "pickle.pyo", line 966, in load_string
ValueError: insecure string pickle

This issue should be changed to something like "insecure string pickle".

Original comment by john.na...@gmail.com on 9 Aug 2010 at 10:29

GoogleCodeExporter commented 9 years ago
I'm not sure why this error occurs, but I suspect that if you remove the token 
files, new tokens will be saved and loaded correctly.

Hopefully pickle will not be used to store tokens in the near-ish future, so 
this issue is unlikely to see any support from me, unless deleting the old 
token files does not solve the problem. If anyone discovers the root cause, I'd 
love to hear it.

Original comment by tom.h.mi...@gmail.com on 11 Aug 2010 at 3:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Re Comment 5 by tom.h.mi...@gmail.com:

Are you going to tell us what specific files you think we should delete,
or must we somehow grok them?

Original comment by john.na...@gmail.com on 11 Aug 2010 at 3:32

GoogleCodeExporter commented 9 years ago
Token file grokked: %HOMEPATH%\.googlecl\access_tok_EMAILADDRESS
Deleting that file, which triggered re-authentication, did solve the pickle 
problem:
   >google docs upload --folder BACKUP --no-convert PATHNAME.rdf
   No supported filetype found for extension rdf
   Uploading as text/plain
   Loading PATHNAME.rdf
   Upload success! Direct link: LINK
Thank you.

Original comment by john.na...@gmail.com on 11 Aug 2010 at 3:42

GoogleCodeExporter commented 9 years ago
Yeah, the location of said files would probably be pretty handy. For anyone 
following in John's footsteps:

For 0.9.9 and below, %HOMEPATH%\.googlecl\access_tok_EMAILADDRESS (equivalent 
to ~/.googlecl/etc on Linux)

For r367 and beyond, it's 
%HOMEPATH%\.local\share\googlecl\access_tok_EMAILADDRESS

Original comment by tom.h.mi...@gmail.com on 11 Aug 2010 at 5:16