Get-app from develop branch

I have my own customer specific app based on erpnext.

I want to install my app two times.
One installation from the master branch “appname”.
And one installation from the develop branch “appname-dev”.

So that I can have two sites with the different apps in them.

But everytime I try to install my app with the command
sudo bench get-app --branch develop appname-dev http://gitlab-url/gitlab-group/AppNAME.git

Checking connectivity… done.
installing appname-dev
INFO:bench.app:installing appname-dev
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 246, in build
frappe.init(‘’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 140, in init
setup_module_map()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 741, in setup_module_map
for module in get_module_list(app):
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 641, in get_module_list
return get_file_items(os.path.join(os.path.dirname(get_module(app_name).file), “modules.txt”))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 599, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
ImportError: No module named appname-dev
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/make.py”, line 28, in get_app
get_app(name, git_url, branch=branch)
File “/home/frappe/bench-repo/bench/app.py”, line 60, in get_app
build_assets(bench_path=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 144, in build_assets
run_frappe_cmd(‘build’, bench_path=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 499, in run_frappe_cmd
raise CommandFailedError(args)
bench.utils.CommandFailedError: (‘build’,)

I found out that I may have to change the app’s name in the setup.py and in modules.txt.

setup.py:

setup(
name=‘AppNAME-Dev’,
[…]
)

modules.txt:

appname-dev

After that I ran sudo bench build

But still I get ImportError: No module named appname-dev.

Any help on this is very much appreciated!

This topic was automatically closed after 24 hours. New replies are no longer allowed.