Error while installing ERPNext Apps

Hi, I am on step 15, point 2 in the following link installation guide.
(GitHub - D-codE-Hub/Guide-to-Install-Frappe-ERPNext-in-Ubuntu-22.04-LTS: A complete Guide to Install Frappe Bench in Ubuntu 22.04 LTS and install Frappe/ERPNext Application)

This error is coming up:-

k@k-laptop:~/frappe-bench$ bench --site dcode.com install-app erpnext

Installing erpnext…
Updating DocTypes for erpnext : [ ] 0%An error occurred while installing erpnext: Module import failed for Invoice Discounting, the DocType you’re trying to open might be deleted.
Error: No module named ‘frappe.website.render’

Hello,

If you have followed the steps exactly, in step 13
bench init frappe-bench
will install the frappe version 14

but in step 15:
bench get-app erpnext --branch version-13

you are getting erpnext version 13. Maybe there is a version mismatch
To get frappe 13:
bench init --frappe-branch=version-13 frappe-bench

This might help. If you want version 14, simply change to version-14

1 Like

Hy @Khizar

You should check the whole post.

Thank You!

k@k-laptop:~/frappe-bench$ bench get-app erpnext --branch version-14 --init-bench
A directory for the application ‘erpnext’ already exists. Do you want to continue and overwrite it? [y/N]: y
INFO: App moved from apps/erpnext to archived/apps/erpnext-2023-08-23_4
Getting erpnext
$ git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-14 --depth 1 --origin upstream
Cloning into ‘erpnext’…
remote: Enumerating objects: 5005, done.
remote: Counting objects: 100% (5005/5005), done.
remote: Compressing objects: 100% (4440/4440), done.
remote: Total 5005 (delta 951), reused 2244 (delta 335), pack-reused 0
Receiving objects: 100% (5005/5005), 17.32 MiB | 202.00 KiB/s, done.
Resolving deltas: 100% (951/951), done.
Ignoring dependencies of erpnext. To install dependencies use --resolve-deps
Installing erpnext
$ /home/k/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/k/frappe-bench/apps/erpnext
$ yarn install
yarn install v1.22.19
[1/4] Resolving packages…
[2/4] Fetching packages…
[3/4] Linking dependencies…
[4/4] Building fresh packages…
Done in 0.38s.
$ bench build --app erpnext
Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/k/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 114, in
main()
File “/home/k/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 20, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/k/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1157, in call
return self.main(*args, **kwargs)
File “/home/k/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1078, in main
rv = self.invoke(ctx)
File “/home/k/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/k/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1685, in invoke
super().invoke(ctx)
File “/home/k/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/k/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 783, in invoke
return __callback(*args, **kwargs)
File “/home/k/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py”, line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/k/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 44, in app_group
ctx.obj = {“sites”: get_sites(site), “force”: force, “verbose”: verbose, “profile”: profile}
File “/home/k/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 56, in get_sites
elif default_site := frappe.get_conf().default_site:
File “/home/k/frappe-bench/apps/frappe/frappe/init.py”, line 359, in get_conf
with init_site(site):
File “/home/k/frappe-bench/apps/frappe/frappe/init.py”, line 369, in enter
init(self.site)
File “/home/k/frappe-bench/apps/frappe/frappe/init.py”, line 245, in init
setup_redis_cache_connection()
File “/home/k/frappe-bench/apps/frappe/frappe/init.py”, line 389, in setup_redis_cache_connection
from frappe.utils.redis_wrapper import RedisWrapper
File “/home/k/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 7, in
from redis.commands.search import Search
ModuleNotFoundError: No module named ‘redis.commands’
ERROR: bench build --app erpnext
subprocess.CalledProcessError: Command ‘bench build --app erpnext’ returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/usr/local/lib/python3.10/dist-packages/bench/commands/make.py”, line 159, in get_app
get_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 444, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 242, in install
install_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 586, in install_app
build_assets(bench_path=bench_path, app=app)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py”, line 351, in build_assets
exec_cmd(command, cwd=bench_path, env={“BENCH_DEVELOPER”: “1”})
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app erpnext

Hi @Khizar ,

To fix redis error, Pls try python -m pip install --upgrade redis.

Also, it seems a broken installation. Once follow this documentation: [Guide] How to install ERPNext v14 on Linux Ubuntu (step-by-step instructions)

I hope this helps.

Thanks!

Maybe also try “bench update”

Hello,

Here is the video tutorial for installing ERPNEXT-14 on Ubuntu 22.04.3 server. follow the video step by step and you will have an error free ERPNEXT running on your system…

1 Like

@TRACKOMATIC_INDIA
Hi, please share the text command page that you have made here or in the description of the video.,

Hi @Khizar

The video in above post is without any voice guidance so you might have missed some steps. here is updated tutorial with voice guidance. I believe it will help you in installing ERPNext 14 on Ubuntu Server.

@TRACKOMATIC_INDIA

Excellent! Thank you… Installed ERPNext finally after almost 10 tries from different blogs…

1 Like