Bench Init failed

Due to internet issue bench init failed while receiving

Receiving objects: 53% (86216/161872), 145.78 MiB | 25.00 KiB/s
error: RPC failed; result=18, HTTP code = 2006 MiB | 0 bytes/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

When try to run again

ValueError: Bench Instance frappe-bench already exists.

Is there any solution to run
bench init frappe-bench

again

Regards,
jgun

delete the folder frappe-bench and try again

I always did it.
Is there any other way? such resume or download collection manual or using download manager then extract it?

I don’t believe there is any other way then deleting the failed bench’s folder

1 Like

have you got solution for your issue?

Hi everyone,
I’m getting the same error: bench init is stopping and freezing at a certain percentage then it throws error
I’ve deleted the directory and used the bench init command several times but the result is the same.
Any help please.
Thanks!

@ahmadt can you paste your full error?

installing frappe
INFO:bench.app:installing frappe
INFO:bench.utils:frappe_bench/env/bin/pip install -q -e frappe_bench/apps/frappe
ERROR: Exception:
Traceback (most recent call last):
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py”, line 397, in _error_catcher
yield
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py”, line 479, in read
data = self._fp.read(amt)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.py”, line 62, in read
data = self.__fp.read(amt)
File “/usr/lib/python3.5/http/client.py”, line 448, in read
n = self.readinto(b)
File “/usr/lib/python3.5/http/client.py”, line 488, in readinto
n = self.fp.readinto(b)
File “/usr/lib/python3.5/socket.py”, line 575, in readinto
return self._sock.recv_into(b)
File “/usr/lib/python3.5/ssl.py”, line 929, in recv_into
return self.read(nbytes, buffer)
File “/usr/lib/python3.5/ssl.py”, line 791, in read
return self._sslobj.read(len, buffer)
File “/usr/lib/python3.5/ssl.py”, line 575, 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 “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/cli/base_command.py”, line 188, in main
status = self.run(options, args)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/commands/install.py”, line 345, in run
resolver.resolve(requirement_set)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/legacy_resolve.py”, line 196, in resolve
self._resolve_one(requirement_set, req)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/legacy_resolve.py”, line 359, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/legacy_resolve.py”, line 307, in _get_abstract_dist_for
self.require_hashes
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/operations/prepare.py”, line 199, in prepare_linked_requirement
progress_bar=self.progress_bar
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/download.py”, line 1064, in unpack_url
progress_bar=progress_bar
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/download.py”, line 924, in unpack_http_url
progress_bar)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/download.py”, line 1152, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/download.py”, line 861, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/utils/hashes.py”, line 75, in check_against_chunks
for chunk in chunks:
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/download.py”, line 829, in written_chunks
for chunk in chunks:
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_internal/download.py”, line 818, in resp_read
decode_content=False):
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py”, line 531, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py”, line 496, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File “/usr/lib/python3.5/contextlib.py”, line 77, in exit
self.gen.throw(type, value, traceback)
File “/opt/erpnext/frappe_bench/env/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py”, line 402, 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.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/opt/erpnext/bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/erpnext/bench/bench/commands/make.py”, line 31, in init
python = python)
File “/opt/erpnext/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 “/opt/erpnext/bench/bench/app.py”, line 136, in get_app
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
File “/opt/erpnext/bench/bench/app.py”, line 172, in install_app
find_links=find_links))
File “/opt/erpnext/bench/bench/utils.py”, line 161, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: frappe_bench/env/bin/pip install -q -e frappe_bench/apps/frappe

on running which command you get this error?

bench init --frappe-branch master frappe_bench --python which python3

@ahmadt try this bench init frappe-bench --frappe-branch master it will work…!!!

1 Like

/opt/erpnext$ bench init frappe-bench --frappe-branch master
INFO:bench.utils:virtualenv -q env -p /usr/bin/python3
Already using interpreter /usr/bin/python3
INFO:bench.utils:env/bin/pip -q install --upgrade pip
INFO:bench.utils:env/bin/pip -q install wheel
INFO:bench.utils:env/bin/pip -q install six
INFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch master --origin upstream
Cloning into ‘frappe’…
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (19/19), done.
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/opt/erpnext/bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/erpnext/bench/bench/commands/make.py”, line 31, in init
python = python)
File “/opt/erpnext/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 “/opt/erpnext/bench/bench/app.py”, line 125, in get_app
cwd=os.path.join(bench_path, ‘apps’))
File “/opt/erpnext/bench/bench/utils.py”, line 161, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch master --origin upstream

Sorry! But it is giving the same error
Thanks!

@ahmadt can you change the python 3 to 2 version and see

but it is already python 2.7
python --version
Python 2.7.12

check your system python version? and share the installation methods you followed.

what do you mean by system python version?

@ahmadt ok just show your installation commands will guide you…!!

I’ve used these commands till bench init

what is your system config like ubuntu version etc