AcademySoftwareFoundation / AcademySoftwareFoundation/rez

rez-pip AttributeError: 'NoneType' object has no attribute 'lower' error

Open
#419 5 comments 0 reactions 0 assignees View on GitHub
bug rez-pip
Dominant language
Python
Stars
1.1k
Forks
369
Avg merge
12d 3h
Merged PRs (30d)
5

Description

rez 2.13.0, linux centos7
rez-pip -i reportlab fails with an AttributeError:

~/packages/pip/9.0.1/platform-linux/arch-x86_64/os-CentOS-7.3.1611/python-2.7/python/pip/commands/install.py:194: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options)
Collecting reportlab
Using cached reportlab-3.4.0.tar.gz
Collecting pillow>=2.4.0 (from reportlab)
Using cached Pillow-4.1.0.tar.gz
Requirement already satisfied: pip>=1.4.1 in ~/packages/python/2.7.13/platform-linux/arch-x86_64/os-CentOS-7.3.1611/lib/python2.7/site-packages (from reportlab)
Requirement already satisfied: setuptools>=2.2 in ~/packages/python/2.7.13/platform-linux/arch-x86_64/os-CentOS-7.3.1611/lib/python2.7/site-packages (from reportlab)
Collecting olefile (from pillow>=2.4.0->reportlab)
Using cached olefile-0.44.zip
Requirement already satisfied: six>=1.6.0 in ~/packages/python/2.7.13/platform-linux/arch-x86_64/os-CentOS-7.3.1611/lib/python2.7/site-packages (from setuptools>=2.2->reportlab)
Requirement already satisfied: appdirs>=1.4.0 in ~/packages/python/2.7.13/platform-linux/arch-x86_64/os-CentOS-7.3.1611/lib/python2.7/site-packages (from setuptools>=2.2->reportlab)
Requirement already satisfied: packaging>=16.8 in ~/packages/python/2.7.13/platform-linux/arch-x86_64/os-CentOS-7.3.1611/lib/python2.7/site-packages (from setuptools>=2.2->reportlab)
Requirement already satisfied: pyparsing in ~/packages/python/2.7.13/platform-linux/arch-x86_64/os-CentOS-7.3.1611/lib/python2.7/site-packages (from packaging>=16.8->setuptools>=2.2->reportlab)
Skipping bdist_wheel for reportlab, due to binaries being disabled for it.
Skipping bdist_wheel for pillow, due to binaries being disabled for it.
Skipping bdist_wheel for olefile, due to binaries being disabled for it.
Installing collected packages: olefile, pillow, reportlab
Running setup.py install for olefile ... done
Running setup.py install for pillow ... done
Running setup.py install for reportlab ... done
Successfully installed olefile pillow reportlab
12:01:49 DEBUG Found /tmp/pip-tx01MG-rez/rez_staging/python/Pillow-4.1.0-py2.7.egg-info
12:01:49 DEBUG Found /tmp/pip-tx01MG-rez/rez_staging/python/olefile-0.44-py2.7.egg-info
12:01:49 DEBUG Found /tmp/pip-tx01MG-rez/rez_staging/python/reportlab-3.4.0-py2.7.egg-info
12:01:49 WARNING Skipping installation: Package variant already exists: ~/packages/Pillow/4.1.0/package.py[0]
Traceback (most recent call last):
File "/usr/local/rez/bin/rez/rez-pip", line 4, in
run('pip')
File "/usr/local/rez/lib/python2.7/site-packages/rez-2.13.0-py2.7.egg/rez/cli/_main.py", line 118, in run
returncode = run_cmd()
File "/usr/local/rez/lib/python2.7/site-packages/rez-2.13.0-py2.7.egg/rez/cli/_main.py", line 110, in run_cmd
return opts.func(opts, opts.parser, arg_groups[1:])
File "/usr/local/rez/lib/python2.7/site-packages/rez-2.13.0-py2.7.egg/rez/cli/pip.py", line 46, in command
release=opts.release)
File "/usr/local/rez/lib/python2.7/site-packages/rez-2.13.0-py2.7.egg/rez/pip.py", line 262, in pip_install_package
requirements.extend(_get_dependencies(requirement, distributions))
File "/usr/local/rez/lib/python2.7/site-packages/rez-2.13.0-py2.7.egg/rez/pip.py", line 74, in _get_dependencies
name = get_distrubution_name(name)
File "/usr/local/rez/lib/python2.7/site-packages/rez-2.13.0-py2.7.egg/rez/pip.py", line 47, in get_distrubution_name
pip_to_rez_name = pip_name.lower().replace("-", "_")
AttributeError: 'NoneType' object has no attribute 'lower'

Contributor guide

Open the contributing guide

Research direction

Start with rez/pip.py around get_distrubution_name at line 47 and trace the call from _get_dependencies; reproduce with `rez-pip -i reportlab` using the reported environment. Done means the reportlab installation no longer raises the NoneType lower() error and dependency handling completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.