Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of that ValueError: need more than 0 values to unpack #636

Open
tobiasherp opened this issue Dec 13, 2023 · 2 comments
Open

Get rid of that ValueError: need more than 0 values to unpack #636

tobiasherp opened this issue Dec 13, 2023 · 2 comments

Comments

@tobiasherp
Copy link

Sometimes a package won't install, and I get a pretty ugly error:

Traceback (most recent call last):
  ...
  File "/my/instance/root/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 688, in install
    for dist in self._get_dist(requirement, ws):
  File "/my/instance/root/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 580, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/my/instance/root/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1762, in _move_to_eggs_dir_and_compile
    [tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack

Can we please have a more useful information, e.g.:

Traceback (most recent call last):
  File "/my/instance/root/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 688, in install
    for dist in self._get_dist(requirement, ws):
  File "/my/instance/root/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 580, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/my/instance/root/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1763, in _move_to_eggs_dir_and_compile
    tmp_loc = single_entry_in_dir(tmp_dest)
  File "/my/instance/root/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1718, in single_entry_in_dir
    raise ValueError('Directory %s missing or empty!' % dn)
ValueError: Directory /my/common/eggs/tmpizfSst missing or empty!

I'd be willing to provide that single_entry_in_dir function, if necessary.
Of course, this won't be sufficient in many cases; the logfile (#635) would be important as well.

I use the most recent zc.buildout version whenever I can, but I still have Python 2.7 and Plone 4.3, so I'd like to have this in a 2.13.x release as well.

@gotcha
Copy link
Member

gotcha commented Dec 14, 2023

Any PR welcome.

Did you try to use buildout 3.0.x with Python 2.7 and Plone 4.3 ? It is supposed to work fine.

@mauritsvanrees
Copy link
Member

The mr.developer Buildout extension had the same problem, and I merged the PR with the fix yesterday. Available in mr.developer 2.0.2. Maybe that can inspire a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants