Buildout -- Software for automating application assembly

user unfriendly error message on extends download error

Reported by Wichert Akkerman on 2010-04-18
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Buildout
Undecided
Unassigned

Bug Description

if you have a configuration with an extends entry in the [buildout] section which points to a non-existing URL the result is not very user friendly:

While:
  Initializing.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/Users/wichert/Library/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/buildout.py", line 1659, in main
    user_defaults, windows_restart, command)
  File "/Users/wichert/Library/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/buildout.py", line 182, in __init__
    data['buildout'].copy(), override))
  File "/Users/wichert/Library/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/buildout.py", line 1335, in _open
    _update(eresult, _open(base, fname, seen, dl_options, override))
  File "/Users/wichert/Library/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/buildout.py", line 1333, in _open
    eresult = _open(base, extends.pop(0), seen, dl_options, override)
  File "/Users/wichert/Library/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/buildout.py", line 1283, in _open
    path, is_temp = download(filename)
  File "/Users/wichert/Library/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/download.py", line 94, in __call__
    local_path, is_temp = self.download_cached(url, md5sum)
  File "/Users/wichert/Library/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/download.py", line 139, in download_cached
    _, is_temp = self.download(url, md5sum, cached_path)
  File "/Users/wichert/Library/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/download.py", line 173, in download
    tmp_path, headers = urllib.urlretrieve(url, tmp_path)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 94, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 235, in retrieve
    fp = self.open(url, data)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 203, in open
    return getattr(self, name)(url)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 358, in open_http
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 375, in http_error
    return self.http_error_default(url, fp, errcode, errmsg, headers)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 381, in http_error_default
    raise IOError, ('http error', errcode, errmsg, headers)
IOError: ('http error', 404, 'Not Found', <httplib.HTTPMessage instance at 0x10069be60>)

As a user I would expect to see something like this:

While:
  Initializing.
Error downloading extends for URL http//example.com/path: 404 Not Found

Confirmed - happened for me when trying to upgrade to Plone 4.

The only way to get the actual URL out is to run buildout with -D switch and inspect the traceback in pdb afterwards.

Changed in zc.buildout:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers