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

TypeError: Unknown color 'Red' #5206

Closed
huang06 opened this issue Jul 29, 2022 · 1 comment · Fixed by #5209
Closed

TypeError: Unknown color 'Red' #5206

huang06 opened this issue Jul 29, 2022 · 1 comment · Fixed by #5209

Comments

@huang06
Copy link

huang06 commented Jul 29, 2022

Issue description

After upgrade to the latest version 2022.7.24, run pipenv --dev -v occurs TypeError: Unknown color 'Red' error.

  • No error occurs when not providing -v flag.
  • No error occurs after downgrading to previous version 2022.7.4.

Steps to replicate

My Pipfile

[[source]]                                                                                                                                                                                                          
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]
jupyterlab = "*"

[requires]

Command

$ pipenv install --dev -v

...
Traceback (most recent call last):
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/resolver.py", line 854, in <module>
    main()
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/resolver.py", line 840, in main
    _main(
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/resolver.py", line 820, in _main
    resolve_packages(
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/resolver.py", line 769, in resolve_packages
    results, resolver = resolve(
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/resolver.py", line 749, in resolve
    return resolve_deps(
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 1080, in resolve_deps
    results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 875, in actually_resolve_deps
    hashes = resolver.resolve_hashes()
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 782, in resolve_hashes
    self.hashes[ireq] = self.collect_hashes(ireq)
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 762, in collect_hashes
    hashes = self._get_hashes_from_pypi(ireq)
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 740, in _get_hashes_from_pypi
    click.style("Warning", bold=True, fg="Red"), ireq.name
  File "/Users/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pipenv/vendor/click/termui.py", line 586, in style
    raise TypeError(f"Unknown color {fg!r}") from None
TypeError: Unknown color 'Red'
✘ Locking Failed!
$ pipenv --support

Pipenv version: '2022.7.24'

Pipenv location: '/usr/local/lib/python3.10/site-packages/pipenv'

Python location: '/usr/local/bin/python3'

Python installations found:

  • 3.10.5: /usr/local/bin/python
  • 3.10.5: /usr/local/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.10.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.4.0-122-generic',
 'platform_system': 'Linux',
 'platform_version': '#138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022',
 'python_full_version': '3.10.5',
 'python_version': '3.10',
 'sys_platform': 'linux'}

System environment variables:

  • HOSTNAME
  • PYTHON_VERSION
  • PWD
  • PYTHON_SETUPTOOLS_VERSION
  • HOME
  • LANG
  • GPG_KEY
  • TERM
  • SHLVL
  • PYTHON_PIP_VERSION
  • PYTHON_GET_PIP_SHA256
  • PYTHON_GET_PIP_URL
  • PATH
  • _
  • PIP_SHIMS_BASE_MODULE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_PYTHON_PATH
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • LANG: C.UTF-8
  • PWD: /

Contents of Pipfile ('/Pipfile'):

[[source]]                                                                                                                                                                                                          
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]
jupyterlab = "*"

[requires]
@huang06 huang06 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2022
@matteius matteius reopened this Jul 29, 2022
@matteius
Copy link
Member

Thanks for reporting this .. will be fixed in the next release.

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

Successfully merging a pull request may close this issue.

2 participants