Skip to content

pip install ujson: pip._vendor.urllib3.exceptions.SSLError: The operation did not complete (read) #6491

@anki-code

Description

@anki-code

Hi! I'm trying to install ujson (it's optional dependency for xonsh shell) on mac:

rustpython -m pip install ujson

Result:

Details
Defaulting to user installation because normal site-packages is not writeable
Collecting ujson
  Downloading ujson-5.11.0.tar.gz (7.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/7.2 MB ? eta -:--:--<bound method Thread._bootstrap of <_RefreshThread(Thread-1, started daemon 2)>>

     ━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━ 3.1/7.2 MB 8.8 MB/s eta 0:00:01
ERROR: Exception:
Traceback (most recent call last):
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/urllib3/response.py", line 561, in read
    data = self._fp_read(amt) if not fp_closed else b""
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/urllib3/response.py", line 527, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 98, in read
    data: bytes = self.__fp.read(amt)
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/7c3bc5e/crates/pylib/Lib/http/client.py", line 465, in read
    s = self.fp.read(amt)
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/7c3bc5e/crates/pylib/Lib/socket.py", line 714, in readinto
    raise
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/7c3bc5e/crates/pylib/Lib/socket.py", line 707, in readinto
    return self._sock.recv_into(b)
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/7c3bc5e/crates/pylib/Lib/ssl.py", line 1304, in recv_into
    return self.read(nbytes, buffer)
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/7c3bc5e/crates/pylib/Lib/ssl.py", line 1148, in read
    raise
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/7c3bc5e/crates/pylib/Lib/ssl.py", line 1138, in read
    return self._sslobj.read(len, buffer)
ssl_error.SSLWantReadError: The operation did not complete (read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/cli/base_command.py", line 107, in _run_wrapper
    status = _inner_run()
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/cli/base_command.py", line 100, in _inner_run
    self.handle_pip_version_check(options)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/cli/base_command.py", line 98, in _inner_run
    return self.run(options, args)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/cli/base_command.py", line 98, in _inner_run
    return self.run(options, args)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/cli/req_command.py", line 91, in wrapper
    raise
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/cli/req_command.py", line 85, in wrapper
    return func(self, options, args)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/commands/install.py", line 516, in run
    return ERROR
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/commands/install.py", line 389, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 110, in resolve
    raise ResolutionTooDeepError from None
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 100, in resolve
    collected.requirements, max_rounds=limit_how_complex_resolution_can_be
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py", line 601, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py", line 436, in resolve
    raise ResolutionImpossible(e.criterion.information) from e
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py", line 434, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py", line 150, in _add_to_criteria
    if not criterion.candidates:
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/resolvelib/structs.py", line 194, in __bool__
    return bool(self._sequence)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 165, in __bool__
    self._bool = any(self)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 1, in <genexpr>
    """Utilities to lazily create and visit candidates found.
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 51, in _iter_built
    versions_found.add(version)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 39, in _iter_built
    candidate = func()
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 181, in _make_candidate_from_link
    link, template, name, version
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 241, in _make_base_candidate_from_link
    return None
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 231, in _make_base_candidate_from_link
    version=version,
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 324, in __init__
    version=version,
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 161, in __init__
    self.dist = self._prepare()
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 257, in _prepare
    failed_step=exc.command_description,
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 238, in _prepare
    dist = self._prepare_distribution()
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 329, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/operations/prepare.py", line 507, in prepare_linked_requirement
    with indent_log():
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/operations/prepare.py", line 543, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/operations/prepare.py", line 625, in _prepare_linked_requirement
    f"error {exc} for URL {link}"
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/operations/prepare.py", line 620, in _prepare_linked_requirement
    hashes,
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/operations/prepare.py", line 184, in unpack_url
    hashes=hashes,
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/operations/prepare.py", line 121, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/network/download.py", line 193, in __call__
    with open(filepath, "wb") as content_file:
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/network/download.py", line 195, in __call__
    self._process_response(download, resp)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/network/download.py", line 219, in _process_response
    logger.warning("Connection timed out while downloading.")
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/network/download.py", line 212, in _process_response
    for chunk in chunks:
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/cli/progress_bars.py", line 66, in _rich_download_progress_bar
    with progress:
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/cli/progress_bars.py", line 67, in _rich_download_progress_bar
    for chunk in iterable:
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/network/utils.py", line 98, in response_chunks
    yield chunk
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_internal/network/utils.py", line 89, in response_chunks
    decode_content=False,
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/urllib3/response.py", line 622, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/urllib3/response.py", line 560, in read
    with self._error_catcher():
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/7c3bc5e/crates/pylib/Lib/contextlib.py", line 194, in __exit__
    raise
  File "/Users/pc/.cargo/git/checkouts/rustpython-63090cdce5e18442/7c3bc5e/crates/pylib/Lib/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/urllib3/response.py", line 479, in _error_catcher
    self.release_conn()
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/urllib3/response.py", line 459, in _error_catcher
    clean_exit = True
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/pip/_vendor/urllib3/response.py", line 449, in _error_catcher
    raise SSLError(e)
pip._vendor.urllib3.exceptions.SSLError: The operation did not complete (read)

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