-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pipenv read TIMEOUT error #3110
Comments
I set in the .env file the Environment variable: but I think that if I have a very slow internet connection this error occurs. |
Pipenv doesn’t load |
Closing for now, feel free to let us know if that doesn’t help! |
I execute the commands from pipenv shell and Pipenv load the file .env . The error happens when you create a connection pool (HTTP/HTTPS) in pipenv.patched.notpip._vendor.urllib3.connectionpool. How Pipenv set --timeout for HTTPConnectionPool/HTTPSConnectionPool with the environment variable PIPENV_TIMEOUT or PIPENV_INSTALL_TIMEOUT
Thanks! |
Hi @techalchemy... Pipenv can establish socket connection by adding the --timeout argument in the command or setting it as an environment variable? Thanks for your help! |
Hello @techalchemy MarketDroid> pipenv shell
Current constraints: Finding the best candidates: Finding secondary dependencies: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
pip._vendor.urllib3.exceptions.ReadTimeoutError
(MarketDroid-gJO6am4_) oleksis@linux-fkos:~/MarketDroid> pipenv install django
Installing django…
Collecting django
Downloading https://files.pythonhosted.org/packages/32/ab/22530cc1b2114e6067eece94a333d6c749fa1c56a009f0721e51c181ea53/Django-2.1.2-py3-none-any.whl (7.3MB)
Error: An error occurred while installing django!
Exception:
Traceback (most recent call last):
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4_/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 331, in error_catcher
yield
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 413, in read
data = self.fp.read(amt)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib64/python3.6/http/client.py", line 449, in read
n = self.readinto(b)
File "/usr/lib64/python3.6/http/client.py", line 493, in readinto
n = self.fp.readinto(b)
File "/usr/lib64/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib64/python3.6/ssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib64/python3.6/ssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "/usr/lib64/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4_/lib/python3.6/site-packages/pip/internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/internal/commands/install.py", line 318, in run
resolver.resolve(requirement_set)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_internal/resolve.py", line 102, in resolve
self.resolve_one(requirement_set, req)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self.get_abstract_dist_for(req_to_install)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_internal/resolve.py", line 209, in get_abstract_dist_for
self.require_hashes
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/internal/operations/prepare.py", line 283, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/internal/download.py", line 836, in unpack_url
progress_bar=progress_bar
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/internal/download.py", line 673, in unpack_http_url
progress_bar)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_internal/download.py", line 897, in _download_http_url
download_url(resp, link, content_file, hashes, progress_bar)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_internal/download.py", line 617, in download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/internal/utils/hashes.py", line 48, in check_against_chunks
for chunk in chunks:
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/internal/download.py", line 585, in written_chunks
for chunk in chunks:
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/internal/utils/ui.py", line 159, in iter
for x in it:
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/internal/download.py", line 574, in resp_read
decode_content=False):
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/vendor/urllib3/response.py", line 465, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 430, in read
raise IncompleteRead(self.fp_bytes_read, self.length_remaining)
File "/usr/lib64/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 336, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
Using pip with --timeout General Options:
(MarketDroid-gJO6am4_) oleksis@linux-fkos:~/MarketDroid> pipenv run pip install --upgrade --timeout 3600 django
Loading .env environment variables…
Collecting django
Downloading https://files.pythonhosted.org/packages/32/ab/22530cc1b2114e6067eece94a333d6c749fa1c56a009f0721e51c181ea53/Django-2.1.2-py3-none-any.whl (7.3MB)
100% |████████████████████████████████| 7.3MB 2.6MB/s
Requirement already satisfied, skipping upgrade: pytz in /home/oleksis/.local/share/virtualenvs/MarketDroid-gJO6am4_/lib/python3.6/site-packages (from django) (2018.5)
Installing collected packages: django
Found existing installation: Django 2.1
Uninstalling Django-2.1:
Successfully uninstalled Django-2.1
Successfully installed django-2.1.2
pipenv.patched.notpip._vendor.urllib3.exceptions.ReadTimeoutError
(MarketDroid-gJO6am4_) oleksis@linux-fkos:~/MarketDroid> pipenv update
Running $ pipenv lock then $ pipenv sync.
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
ireq = self.resolve_reqs(download_dir, ireq, wheel_cache)
File "/usr/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 296, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 263, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 213, in _get_abstract_dist_for
self.require_hashes
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 279, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/download.py", line 837, in unpack_url
progress_bar=progress_bar
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/download.py", line 674, in unpack_http_url
progress_bar)
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/download.py", line 898, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/download.py", line 618, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/utils/hashes.py", line 48, in check_against_chunks
for chunk in chunks:
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/download.py", line 586, in written_chunks
for chunk in chunks:
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/download.py", line 575, in resp_read
decode_content=False):
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_vendor/urllib3/response.py", line 465, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_vendor/urllib3/response.py", line 430, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib64/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.6/site-packages/pipenv/patched/notpip/_vendor/urllib3/response.py", line 336, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pipenv.patched.notpip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
The text was updated successfully, but these errors were encountered: