Skip to content

'NoneType' object has no attribute 'endswith' #24

joeshaw opened this Issue Jan 9, 2014 · 1 comment

2 participants

joeshaw commented Jan 9, 2014

I recently started getting the following error trying to do installs with pip-accel. I don't hardcode the version of pip-accel I install, so it might be something introduced in a recent release, but I haven't narrowed it down yet:

2014-01-09 19:30:46 build01 pip-accel[19661] INFO Unpacked local source distributions in 3.81 seconds.
Traceback (most recent call last):
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/bin/pip-accel", line 9, in <module>
    load_entry_point('pip-accel==0.11.2', 'console_scripts', 'pip-accel')()
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/lib/python2.6/site-packages/pip_accel/", line 99, in main
    requirements = unpack_source_dists(arguments, build_directory)
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/lib/python2.6/site-packages/pip_accel/", line 177, in unpack_source_dists
    return sorted([Requirement(r) for r in requirement_set.requirements.values()],
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/lib/python2.6/site-packages/pip_accel/", line 46, in __init__
    self.old_interface = (, self.version, self.source_directory)
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/lib/python2.6/site-packages/pip_accel/", line 80, in version
    return self.pip_requirement.installed_version
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/lib/python2.6/site-packages/pip/", line 390, in installed_version
    return self.pkg_info()['version']
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/lib/python2.6/site-packages/pip/", line 359, in pkg_info
    logger.warn('No PKG-INFO file found in %s' % display_path(self.egg_info_path('PKG-INFO')))
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/lib/python2.6/site-packages/pip/", line 306, in egg_info_path
    base = os.path.join(self.source_dir, 'pip-egg-info')
  File "/home/buildbot/jenkins/workspace/gemstone-server-integration-prod/gemstone-server/virtualenv/lib/python2.6/", line 67, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

pip is version 1.4.1, which I've been using for a while. And although the exception is down in pip itself, if I replace pip-accel in my script with pip, it works fine.

I've tried nuking my ~/.pip-accel directory but that didn't work. Any other ideas?

@xolox xolox added a commit that referenced this issue Feb 18, 2014
@xolox xolox Bug fix for issue #24 (regression introduced in 0.11)
When I released pip-accel 0.11 some logic was changed (handling of
requirements with a `satisfied_by' value). This introduced a fairly
subtle bug which I never saw until an issue on GitHub and a complaint
by a colleague pointed out the problem. Here's the issue on GitHub:

Paylogic member
xolox commented Feb 18, 2014

Hi Joe and thanks for the feedback!

For a while there I wasn't able to reproduce this, but a colleague of mine recently ran into this problem and this allowed me to attach a debugger to find out exactly what was going on (thanks @menollo).

Long story short, I introduced a bug in pip-accel 0.11 where it would fail on pip-accel install distribute and/or pip-accel install setuptools (equivalent commands really) but only when the already installed version of distribute/setuptools is recent enough within the Python environment... On my hosts I have an older version of setuptools installed so I never noticed this issue.

Given the above information I was able to reproduce the problem and confirm that it's fixed in pip-accel 0.11.7 so I'm fairly certain this problem is now resolved. This is why I'm closing this issue. If you're still seeing the problem feel free to reopen this issue or create a new one.

@xolox xolox closed this Feb 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.