Skip to content

Failure on old Pythons #2

@uranusjr

Description

@uranusjr
Traceback (most recent call last):
  File "/Users/uranusjr/Library/PythonUp/versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Users/uranusjr/Library/PythonUp/versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/uranusjr/Documents/programming/python/pipenv/pipenv/help.py", line 94, in <module>
    get_pipenv_diagnostics()
  File "/Users/uranusjr/Documents/programming/python/pipenv/pipenv/help.py", line 33, in get_pipenv_diagnostics
    found = finder.find_python_version(python_v)
  File "pipenv/vendor/pythonfinder/pythonfinder.py", line 58, in find_python_version
    major, minor=minor, patch=patch, pre=pre, dev=dev
  File "pipenv/vendor/pythonfinder/models/path.py", line 154, in find_python_version
    path_filter = filter(None, [sub_finder(p) for p in paths])
  File "pipenv/vendor/pythonfinder/models/__init__.py", line 70, in find_python_version
    None, filter(lambda c: version_matcher(py_version(c)), finder)
  File "pipenv/vendor/pythonfinder/models/__init__.py", line 68, in <genexpr>
    finder = (c for c in self.children.values() if is_py(c) and py_version(c))
  File "pipenv/vendor/pythonfinder/models/path.py", line 223, in as_python
    self.py_version = PythonVersion.from_path(self.path)
  File "pipenv/vendor/pythonfinder/models/python.py", line 125, in from_path
    py_version, _ = get_python_version(str(path.path))
  File "pipenv/vendor/pythonfinder/utils.py", line 45, in get_python_version
    return _run(version_cmd)
  File "pipenv/vendor/pythonfinder/utils.py", line 36, in _run
    stderr=subprocess.PIPE,
TypeError: __init__() got an unexpected keyword argument 'encoding'

The encoding argument of subprocess.Popen is only available in Python 3.6 or later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions