[New-bugs-announce] [issue20809] isabspath fails if path is None

<--This Guy report at bugs.python.org
Fri Feb 28 17:18:36 CET 2014

New submission from <--This Guy:

So far I've noticed this is only reproducible when running quickly with python2.7. Still, the error message seems like it would be confusing to new users to Python.

user at host:~/foo/bar/project$ sudo python setup.py install
DEBUG: Adding /foo/bar/project to system path.
ERROR: Python module settings not found
ERROR: Python module settings not found
.... # basically, more DistUtilsExtra errors...
running install
DEBUG: Adding /foo/bar/project to system path.
running build
running build_py
running build_scripts
running build_i18n
DEBUG: Desktop files: ['project.desktop.in']
intltool-update -p -g ryode
running build_icons
running build_help
running install_lib
copying build/lib/__init__.py -> /usr/local/lib/python2.7/site-packages
copying build/lib/ryode/__init__.py -> /usr/local/lib/python2.7/site-packages/ryode
byte-compiling /usr/local/lib/python2.7/site-packages/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python2.7/site-packages/ryode/__init__.py to __init__.pyc
running install_scripts
copying build/scripts-2.7/project -> /usr/local/bin
changing mode of /usr/local/bin/project to 775
running install_data
copying build/share/applications/project.desktop -> /usr/local/share/applications
running install_egg_info
Removing /usr/local/lib/python2.7/site-packages/project-0.1-py2.7.egg-info
Writing /usr/local/lib/python2.7/site-packages/project-0.1-py2.7.egg-info
Traceback (most recent call last):
  File "setup.py", line 144, in <module>
    cmdclass={'install': InstallAndUpdateDataDirectory}
  File "/usr/local/lib/python2.7/site-packages/python_distutils_extra-2.38-py2.7.egg/DistUtilsExtra/auto.py", line 100, in setup
  File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
  File "setup.py", line 116, in run
    target_data = '/' + os.path.relpath(self.install_data, self.root) + '/'
  File "/usr/local/lib/python2.7/posixpath.py", line 437, in relpath
    start_list = [x for x in abspath(start).split(sep) if x]
  File "/usr/local/lib/python2.7/posixpath.py", line 367, in abspath
    if not isabs(path):
  File "/usr/local/lib/python2.7/posixpath.py", line 61, in isabs
    return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

components: Build
messages: 212457
nosy: jordannh
priority: normal
severity: normal
status: open
title: isabspath fails if path is None
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list