peritus / bumpversion

Version-bump your software with a single command
https://pypi.python.org/pypi/bumpversion
MIT License
1.5k stars 148 forks source link

bumpversion fails with "ValueError: insecure string pickle" #124

Open tradel opened 8 years ago

tradel commented 8 years ago

I have been using bumpversion in a few of my projects. Recently I committed a fix to a project I hadn't touched in a while. I committed the changes, then ran bumpversion minor and got the following error:

Traceback (most recent call last):
  File "/Users/tradel/virtualenv/download-bot/bin/bumpversion", line 11, in <module>
    sys.exit(main())
  File "/Users/tradel/virtualenv/download-bot/lib/python2.7/site-packages/bumpversion/__init__.py", line 658, in main
    if vcs.is_usable():
  File "/Users/tradel/virtualenv/download-bot/lib/python2.7/site-packages/bumpversion/__init__.py", line 83, in is_usable
    stdout=subprocess.PIPE
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1334, in _execute_child
    child_exception = pickle.loads(data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 966, in load_string
    raise ValueError, "insecure string pickle"
ValueError: insecure string pickle

Using python 2.7.10 and bumpversion 0.5.3.

phcorp commented 8 years ago

:+1: same problem here

zanaca commented 8 years ago

:+1: Same here. It seens like a OSX related problem. On Ubuntu it works fine.

ohcibi commented 8 years ago

I've the same problem and investigated this a bit. The error is thrown in __init__.py of bumpversion on lines 658/83 where bumpversion checks for available VCS. This line: https://github.com/peritus/bumpversion/blob/master/bumpversion/__init__.py#L186 tells which VCS' are tested.

My system had git but not mercurial installed. So I tried removing Mercurial in the above line and bumpversion works again. bumpversion also worked after I installed mercurial again, even with Mercurial being checked.

I don't know If I had mercurial installed before but It seems very likely that I had, looking at this. So I'm not sure why this happens and how to fix it but anyone stumbling across this, should be able to work again if mercurial gets installed. (I guess bumpversion should simply conclude that mercurial is not available and continue working instead of exiting immediately)