Bench init error ubuntu 18.04 - read operation timed out

wolone, [08.12.19 16:52]
ERROR: Exception:
Traceback (most recent call last):
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 425, in _error_catcher
yield
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py”, line 62, in read
data = self.fp.read(amt)
File “/usr/lib/python3.6/http/client.py”, line 459, in read
n = self.readinto(b)
File “/usr/lib/python3.6/http/client.py”, line 503, in readinto
n = self.fp.readinto(b)
File “/usr/lib/python3.6/socket.py”, line 586, in readinto
return self._sock.recv_into(b)
File “/usr/lib/python3.6/ssl.py”, line 1012, in recv_into
return self.read(nbytes, buffer)
File “/usr/lib/python3.6/ssl.py”, line 874, in read
return self._sslobj.read(len, buffer)
File “/usr/lib/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/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/cli/base_command.py”, line 153, in _main
status = self.run(options, args)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/commands/install.py”, line 382, in run
resolver.resolve(requirement_set)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py”, line 201, in resolve
self._resolve_one(requirement_set, req)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py”, line 365, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py”, line 313, in _get_abstract_dist_for
req, self.session, self.finder, self.require_hashes
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/operations/prepare.py”, line 194, in prepare_linked_requirement
progress_bar=self.progress_bar
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/download.py”, line 465, in unpack_url
progress_bar=progress_bar
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/download.py”, line 316, in unpack_http_url
progress_bar)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/download.py”, line 551, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/download.py”, line 253, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/utils/hashes.py”, line 80, in check_against_chunks
for chunk in chunks:
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/download.py”, line 223, in written_chunks
for chunk in chunks:
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_internal/download.py”, line 212, in resp_read
decode_content=False):
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File “/usr/lib/python3.6/contextlib.py”, line 99, in __exit
self.gen.throw(type, value, traceback)
File “/home/wolone/frappe-bench/env/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, “Read timed out.”)

wolone, [08.12.19 16:52]
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.
Traceback (most recent call last):
File “/home/wolone/.local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/wolone/bench/bench/cli.py”, line 40, in cli
bench_command()
File “/home/wolone/.local/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/wolone/.local/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/wolone/.local/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/wolone/.local/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/wolone/.local/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/wolone/bench/bench/commands/make.py”, line 31, in init
python = python)
File “/home/wolone/bench/bench/utils.py”, line 75, in init
get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)
File “/home/wolone/bench/bench/app.py”, line 136, in get_app
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
File “/home/wolone/bench/bench/app.py”, line 171, in install_app
exec_cmd(“{pip} install {quiet} -U -e {app} {no_cache}”.format(pip=pip_path, quiet=quiet_flag, app=app_path, no_cache=cache_flag))
File “/home/wolone/bench/bench/utils.py”, line 161, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: frappe-bench/env/bin/pip install -q -U -e frappe-bench/apps/frappe

Does your access to this url from a browser timeout? https://files.pythonhosted.org

If this the first time or have you had successful access in the past? Possibly your government may be blocking access?

https://ask.openstack.org/en/question/115238/readtimeouterror-httpsconnectionpoolhostfilespythonhostedorg-port443-read-timed-out/

edit: You have had prior success Ubuntu 18.04 erpnextv12

@wolone
Seems to be network or connectivitey issue .