$ bench get-app agriculture
Getting agriculture
$ git clone GitHub - frappe/agriculture: Agriculture Domain for ERPNext --depth 1 --origin upstream
Cloning into ‘agriculture’…
remote: Enumerating objects: 125, done.
remote: Counting objects: 100% (125/125), done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 125 (delta 36), reused 75 (delta 27), pack-reused 0
Receiving objects: 100% (125/125), 46.03 KiB | 1.02 MiB/s, done.
Resolving deltas: 100% (36/36), done.
Ignoring dependencies of agriculture. To install dependencies use --resolve-deps
Installing agriculture
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/agriculture
$ bench build --app agriculture
Linking /home/frappe/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules Linking /home/frappe/frappe-bench/apps/payments/payments/public to ./assets/payments Linking /home/frappe/frappe-bench/apps/erpnext/erpnext/public to ./assets/erpnext Linking /home/frappe/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules 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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 82, in build
bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
File “/home/frappe/frappe-bench/apps/frappe/frappe/build.py”, line 239, in bundle
make_asset_dirs(hard_link=hard_link)
File “/home/frappe/frappe-bench/apps/frappe/frappe/build.py”, line 389, in make_asset_dirs
click.echo(unstrip(click.style(“\u2714”, fg=“green”) + " Application Assets Linked") + “\n”)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/utils.py”, line 272, in echo
file.write(message)
UnicodeEncodeError: ‘latin-1’ codec can’t encode character ‘\u2714’ in position 5: ordinal not in range(256)
ERROR:
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 127, in cli
bench_command()
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
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 432, 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 230, in install
install_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 574, in install_app
build_assets(bench_path=bench_path, app=app)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py”, line 330, 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 155, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError
after installation:-
Migrating agr
Updating DocTypes for frappe : [====================] 100%
Updating DocTypes for payments : [====================] 100%
Updating DocTypes for erpnext : [====================] 100%
Updating DocTypes for hrms : [====================] 100%
Updating DocTypes for agriculture : [====================] 100%
Updating Dashboard for frappe
Updating Dashboard for payments
Updating Dashboard for erpnext
Updating Dashboard for hrms
Updating Dashboard for agriculture
Updating customizations for Address
Updating customizations for Contact
Building search index for agr
Retrieving Routes : [====================] 100%
Building Index : [====================] 100%
Building assets…
Assets for Release v14.9.0 don’t exist
Linking /home/frappe/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules Linking /home/frappe/frappe-bench/apps/payments/payments/public to ./assets/payments Linking /home/frappe/frappe-bench/apps/erpnext/erpnext/public to ./assets/erpnext Linking /home/frappe/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules 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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 82, in build
bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
File “/home/frappe/frappe-bench/apps/frappe/frappe/build.py”, line 239, in bundle
make_asset_dirs(hard_link=hard_link)
File “/home/frappe/frappe-bench/apps/frappe/frappe/build.py”, line 389, in make_asset_dirs
click.echo(unstrip(click.style(“\u2714”, fg=“green”) + " Application Assets Linked") + “\n”)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/utils.py”, line 272, in echo
file.write(message)
UnicodeEncodeError: ‘latin-1’ codec can’t encode character ‘\u2714’ in position 5: ordinal not in range(256)
only this added to workspace.
Hi. Has Anyone been able to solve this problem yet ?
I still have the same problem
same issue here…
There are actually no agriculture related doctypes available in the awesomebar when I search for them by name but they are listed in the doctype list. There are also no agriculture related doctypes in the Role Permission Manager list. The reason the doctype “Location” is showing in the Agriculture workspace is because it is part of the Assets module.
Versions:
Agriculture: v0.0.1 (develop)
ERPNext: v14.10.0 (version-14)
Frappe Framework: v14.18.1 (version-14)
LittleBunyip: v0.0.1 (develop)
Payments: v0.0.1 (develop)
Wiki: v0.0.1 (master)
I just got this app to install on v14. The reasons I found why it was not working with version 14 are:
- The setup.py file is not run after install because in version 14 it needs to be called by the
hooks.py
file with theafter_install
key; - The domain “Agriculture” has to be specifically enabled in the
Domain Settings
doctype. Without this set we can see the doctypes in the doctype list but we cannot get to enter a specific doctype because of a module not found error;
Here is how I got it to work.
- Install the app with
bench get-app agriculture
- Change the
# Installation
section of the fileyour-bench-directory/apps/agriculture/agriculture/hooks.py
to:
# Installation
# ------------
# before_install = "agriculture.install.before_install"
# after_install = "agriculture.install.after_install"
after_install = "agriculture.agriculture.setup.setup_agriculture"
- Install the agriculture app in your site. I only have one site so I don’t need to use the
--site my-site-name
option.
bench install-app agriculture
- Restart bench
- Login into your erpnext system as a user with admin permissions.
- Go to the “Domain Settings” from the search bar and tick the Agriculture checkbox under “Active Domains”
- Go back to your /app page and make sure to refresh the page in your browser.
The “Agriculture” heading should be in your sidebar and if you click the Agriculture menu it should show you the Agriculture Dashboard and the doctype should be accessible. You may have to add “Agriculture” to the list of enabled modules in your user settings and also select the Roles “Agriculture User” and “Agriculture Manager”.