Created
November 4, 2022 07:33
-
-
Save drorata/8ab134b041cb1078cc87c28ddf0a4018 to your computer and use it in GitHub Desktop.
Error when trying to install mypy using poetry (from home using wifi+vpn)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stack trace: | |
7 ~\.poetry\lib\site-packages\urllib3\response.py:443 in _error_catcher | |
441│ try: | |
442│ try: | |
→ 443│ yield | |
444│ | |
445│ except SocketTimeout: | |
6 ~\.poetry\lib\site-packages\urllib3\response.py:566 in read | |
564│ | |
565│ with self._error_catcher(): | |
→ 566│ data = self._fp_read(amt) if not fp_closed else b"" | |
567│ if amt is None: | |
568│ flush_decoder = True | |
5 ~\.poetry\lib\site-packages\urllib3\response.py:532 in _fp_read | |
530│ else: | |
531│ # StringIO doesn't like amt=None | |
→ 532│ return self._fp.read(amt) if amt is not None else self._fp.read() | |
533│ | |
534│ def read(self, amt=None, decode_content=None, cache_content=False): | |
4 ~\.poetry\lib\site-packages\cachecontrol\filewrapper.py:90 in read | |
88│ | |
89│ def read(self, amt=None): | |
→ 90│ data = self.__fp.read(amt) | |
91│ if data: | |
92│ # We may be dealing with b'', a sign that things are over: | |
3 ~\.pyenv\pyenv-win\versions\3.10.7\lib\http\client.py:465 in read | |
463│ # clip the read to the "end of response" | |
464│ amt = self.length | |
→ 465│ s = self.fp.read(amt) | |
466│ if not s and amt: | |
467│ # Ideally, we would raise IncompleteRead if the content-length | |
2 ~\.pyenv\pyenv-win\versions\3.10.7\lib\socket.py:705 in readinto | |
703│ while True: | |
704│ try: | |
→ 705│ return self._sock.recv_into(b) | |
706│ except timeout: | |
707│ self._timeout_occurred = True | |
1 ~\.pyenv\pyenv-win\versions\3.10.7\lib\ssl.py:1274 in recv_into | |
1272│ "non-zero flags not allowed in calls to recv_into() on %s" % | |
1273│ self.__class__) | |
→ 1274│ return self.read(nbytes, buffer) | |
1275│ else: | |
1276│ return super().recv_into(buffer, nbytes, flags) | |
TimeoutError | |
The read operation timed out | |
at ~\.pyenv\pyenv-win\versions\3.10.7\lib\ssl.py:1130 in read | |
1126│ if self._sslobj is None: | |
1127│ raise ValueError("Read on closed or unwrapped SSL socket.") | |
1128│ try: | |
1129│ if buffer is not None: | |
→ 1130│ return self._sslobj.read(len, buffer) | |
1131│ else: | |
1132│ return self._sslobj.read(len) | |
1133│ except SSLError as x: | |
1134│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: | |
The following error occurred when trying to handle this error: | |
Stack trace: | |
4 ~\.poetry\lib\site-packages\requests\models.py:816 in generate | |
814│ if hasattr(self.raw, "stream"): | |
815│ try: | |
→ 816│ yield from self.raw.stream(chunk_size, decode_content=True) | |
817│ except ProtocolError as e: | |
818│ raise ChunkedEncodingError(e) | |
3 ~\.poetry\lib\site-packages\urllib3\response.py:627 in stream | |
625│ else: | |
626│ while not is_fp_closed(self._fp): | |
→ 627│ data = self.read(amt=amt, decode_content=decode_content) | |
628│ | |
629│ if data: | |
2 ~\.poetry\lib\site-packages\urllib3\response.py:565 in read | |
563│ fp_closed = getattr(self._fp, "closed", False) | |
564│ | |
→ 565│ with self._error_catcher(): | |
566│ data = self._fp_read(amt) if not fp_closed else b"" | |
567│ if amt is None: | |
1 ~\.pyenv\pyenv-win\versions\3.10.7\lib\contextlib.py:153 in __exit__ | |
151│ value = typ() | |
152│ try: | |
→ 153│ self.gen.throw(typ, value, traceback) | |
154│ except StopIteration as exc: | |
155│ # Suppress StopIteration *unless* it's the same exception that | |
ReadTimeoutError | |
HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. | |
at ~\.poetry\lib\site-packages\urllib3\response.py:448 in _error_catcher | |
444│ | |
445│ except SocketTimeout: | |
446│ # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but | |
447│ # there is yet no clean way to get at it from this context. | |
→ 448│ raise ReadTimeoutError(self._pool, None, "Read timed out.") | |
449│ | |
450│ except BaseSSLError as e: | |
451│ # FIXME: Is there a better way to differentiate between SSLErrors? | |
452│ if "read operation timed out" not in str(e): | |
The following error occurred when trying to handle this error: | |
Stack trace: | |
7 ~\.poetry\lib\site-packages\poetry\installation\executor.py:261 in _execute_operation | |
259│ | |
260│ try: | |
→ 261│ result = self._do_execute_operation(operation) | |
262│ except EnvCommandError as e: | |
263│ if e.e.returncode == -2: | |
6 ~\.poetry\lib\site-packages\poetry\installation\executor.py:334 in _do_execute_operation | |
332│ return 0 | |
333│ | |
→ 334│ result: int = getattr(self, f"_execute_{method}")(operation) | |
335│ | |
336│ if result != 0: | |
5 ~\.poetry\lib\site-packages\poetry\installation\executor.py:454 in _execute_install | |
452│ | |
453│ def _execute_install(self, operation: Install | Update) -> int: | |
→ 454│ status_code = self._install(operation) | |
455│ | |
456│ self._save_url_reference(operation) | |
4 ~\.poetry\lib\site-packages\poetry\installation\executor.py:488 in _install | |
486│ archive = self._download_link(operation, Link(package.source_url)) | |
487│ else: | |
→ 488│ archive = self._download(operation) | |
489│ | |
490│ operation_message = self.get_operation_message(operation) | |
3 ~\.poetry\lib\site-packages\poetry\installation\executor.py:647 in _download | |
645│ self._yanked_warnings.append(message) | |
646│ | |
→ 647│ return self._download_link(operation, link) | |
648│ | |
649│ def _download_link(self, operation: Install | Update, link: Link) -> Path: | |
2 ~\.poetry\lib\site-packages\poetry\installation\executor.py:656 in _download_link | |
654│ # No cached distributions was found, so we download and prepare it | |
655│ try: | |
→ 656│ archive = self._download_archive(operation, link) | |
657│ except BaseException: | |
658│ cache_directory = self._chef.get_cache_directory_for_link(link) | |
1 ~\.poetry\lib\site-packages\poetry\installation\executor.py:718 in _download_archive | |
716│ archive.parent.mkdir(parents=True, exist_ok=True) | |
717│ with archive.open("wb") as f: | |
→ 718│ for chunk in response.iter_content(chunk_size=4096): | |
719│ if not chunk: | |
720│ break | |
ConnectionError | |
HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. | |
at ~\.poetry\lib\site-packages\requests\models.py:822 in generate | |
818│ raise ChunkedEncodingError(e) | |
819│ except DecodeError as e: | |
820│ raise ContentDecodingError(e) | |
821│ except ReadTimeoutError as e: | |
→ 822│ raise ConnectionError(e) | |
823│ except SSLError as e: | |
824│ raise RequestsSSLError(e) | |
825│ else: | |
826│ # Standard file-like object. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment