Rebuilding a Plone 4.2 site and getting ValueError: too many values to unpack

Reposting as suggested in SO: https://stackoverflow.com/questions/58634022/rebuilding-a-plone-4-2-site-and-getting-valueerror-too-many-values-to-unpack

I am moving an old Plone 4.2.4 product to a new server as we slowly deprecate it. So far we have copied the entire directory as well as the Python2.7 directory from one server to another. I was able to get through the SSL complaint by downloading bootstrap from github and running bootstrap.

We should have all the eggs in a buildout cache and I see collective.recipe.filestorage-0.6-py2.7.egg in the eggs folder, so I do not understand why buildout is complaining, but it trips on the second egg:

$ ./bin/buildout -oNv -c zeo-production.cfg
Installing 'buildout.dumppickedversions', 'mr.developer'.
We have the distribution that satisfies 'buildout.dumppickedversions==0.5'.
We have the distribution that satisfies 'mr.developer==1.21'.
...
Installing 'zc.recipe.egg'.
We have the distribution that satisfies 'zc.recipe.egg==1.2.2'.
Installing 'collective.recipe.filestorage'.
We have the distribution that satisfies 'collective.recipe.filestorage==0.6'.
While:
  Installing.
  Getting section filestorage.
  Initializing section filestorage.
  Installing recipe collective.recipe.filestorage.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/opt/python-2.7.8/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1660, in main
    getattr(buildout, command)(args)
  File "/opt/python-2.7.8/lib/python2.7/site-packages/zc/buildout/buildout.py", line 416, in install
    [self[part]['recipe'] for part in install_parts]
  File "/opt/python-2.7.8/lib/python2.7/site-packages/zc/buildout/buildout.py", line 964, in __getitem__
    options._initialize()
  File "/opt/python-2.7.8/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1048, in _initialize
    recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
  File "/opt/python-2.7.8/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1004, in _install_and_load
    allow_hosts=buildout._allow_hosts
  File "/opt/python-2.7.8/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 800, in install
    return installer.install(specs, working_set)
  File "/opt/python-2.7.8/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 662, in install
    [requirement] = err
ValueError: too many values to unpack
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************

Any ideas?

collective.recipe.filestorage is a bit more complex in that it requests variables/configs from other recipes to figure out about the different filestorage locations and mountpoints. It might indicate a problem with plone.recipe.zope2instance.

Another helper is to run bin/buildout -D which will drop you into a debugger (pdb) so you can move up the stack trace and import things.

another idea:

In older Plone 4.3 buildouts we had to pin plone.recipe.zope2intance to at least 4.4.0 (from 4.3.X) becaus there is a setuptools conflict before that which also gives the 'too many values to unpack' error. Which setuptools version are you using?


4.4.0 (2018-04-24)

New features:

    Added support for setting instance-home option. [zupo]
    Added support for setting CGI environment variables. [zupo]

Bug fixes:

    Regard ‘parsed_version’ of setuptools > 38.7.0 does not return iterable anymore, fixes #37. [ida]

Pinning to 4.4.0 didn't seem to help. Once I get to the PDB prompt I'm not quite sure what I should be importing. Any suggestions there?

I see plone.recipe.zope2instance-4.2.8-py2.7.egg in my eggs folder, which is older. I'm using setuptools 6.1. Should I upgrade setuptools?

@pwaldo2 I don't have any other tips for you that might try as a 'quick solution'. :frowning:

Plone 4.2 has been out of support for many years already, the still supported Plone 4 version is 4.3.x. It helps to have some Python & Zope/Plone experience to solve the kind of errors that can pop up if you upgrade an site which has been untouched for so long. Hopefully you've managed to fix it already.

Plone Foundation Code of Conduct