Ubuntu 18 unable to install custom app

Hi,

After upgrading to ubuntu 18.04, bench commands are not supported so I have uninstall frappe & erpnext and re install again. Erpnext & frappe installed successfully but I am not able to install my custom apps. Installation process throwing an error “could not find app”, though app is present inside apps folder under frappe-bench.Also bench update ended with the same messages.

Can you post the commands used for the installation of your app? Sounds like you are trying something manual beyond the standard bench get-app & install-app method?

My custom app name is tearp. below commands I have used so far -
~/frappe-bench$ bench get-app tearp https://prashanta@bitbucket.org/tearp/tearp.git
~/frappe-bench$ bench --site site1.local install-app tearp

try using this

should work for v18 , thanks.

else try this -

Custom app installation failed with the following error:-
user@user-H81M-WW:~/frappe-bench$ bench get-app tearp https://prashanta@bitbucket.org/tearp/tearp.git
INFO:bench.app:getting app tearp
INFO:bench.utils:git clone https://prashanta@bitbucket.org/tearp/tearp.git --depth 1 --origin upstream
Cloning into ‘tearp’…
Password for ‘https://prashanta@bitbucket.org’:
remote: Counting objects: 1293, done.
remote: Compressing objects: 100% (897/897), done.
remote: Total 1293 (delta 703), reused 731 (delta 389)
Receiving objects: 100% (1293/1293), 460.08 KiB | 354.00 KiB/s, done.
Resolving deltas: 100% (703/703), done.
(‘installing’, u’tearp’)
INFO:bench.app:installing tearp
INFO:bench.utils:./env/bin/pip install -q -e ./apps/tearp --no-cache-dir
Command “python setup.py egg_info” failed with error code 1 in /home/user/frappe-bench/apps/tearp/
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/user/bench/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/user/bench/bench/commands/make.py”, line 40, in get_app
get_app(git_url, branch=branch)
File “/home/user/bench/bench/app.py”, line 135, in get_app
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
File “/home/user/bench/bench/app.py”, line 179, in install_app
find_links=find_links))
File “/home/user/bench/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/tearp --no-cache-dir

If you manually clone the repo from Bitbucket and use bench --site YOUR_SITE_NAME install-app tearp does this error still occur

Yes. Its throwing error No module name tearp.
user@user-H81M-WW:~/frappe-bench/apps$ git clone https://prashanta@bitbucket.org/tearp/tearp.git
Cloning into ‘tearp’…
Password for ‘https://prashanta@bitbucket.org’:
remote: Counting objects: 9467, done.
remote: Compressing objects: 100% (960/960), done.
remote: Total 9467 (delta 661), reused 0 (delta 0)
Receiving objects: 100% (9467/9467), 1.37 MiB | 761.00 KiB/s, done.
Resolving deltas: 100% (7461/7461), done.

user@user-H81M-WW:~/frappe-bench$ bench --site site1.local install-app tearp
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, 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/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/user/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/commands/site.py”, line 163, in install_app
frappe.init(site=site)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 162, in init
setup_module_map()
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 951, in setup_module_map
for module in get_module_list(app):
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 825, in get_module_list
return get_file_items(os.path.join(os.path.dirname(get_module(app_name).file), “modules.txt”))
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 783, 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 tearp

I have manually added tearp in apps.txt

Thank you…

It says that module tearp is not present in modules.txt. It is either present in frappe or erpnext app.

“tearp” is a custom app. even I have tried by manually adding “tearp” in modules.txt in both erpnext & frappe but no luck. the error is same.

I do know that. Actually when you install a Custom App a module of the same name is added to the modules.txt. An example is here - my custom app name is Furst.

Now if you have already tried uninstalling and removing the app, I suggest you try installation on a new site.

The below command solved my problem.
python -m pip install pip==9.0.3

Thank you,

1 Like