App download from my repository

You have do:
bench get-app https://github.com/leonardoaugt/naming-items
first, then
bench install-app naming-items
Sorry, I skipped a step.

1 Like

I tried this ‘bench get-app naming-items https://github.com/leonardoaugt/naming-items
But returned: no such file or directory: u’ .apps/naming-items/setup.py

My repository it’s wrong or something like that?

When you added the app to git, you did it from the wrong folder, so it’s a bit deeper into the repo than just https://github.com/leonardoaugt/naming-items

Maybe using https://github.com/leonardoaugt/naming-items/tree/master/naming_items would work, but I’m not sure.

I checked your repository,

try following commands -

bench get-app naming-items https://github.com/leonardoaugt/naming-items.git

then,

bench install-app naming-items

Always take this link as git repo to clone/download

1 Like

I tried
bench get-app naming-items https://github.com/leonardoaugt/naming-items.git

File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/make.py”, line 30, in get_app
get_app(git_url, branch=branch)
File “/home/frappe/.bench/bench/app.py”, line 65, in get_app
cwd=os.path.join(bench_path, ‘apps’))
File “/home/frappe/.bench/bench/utils.py”, line 130, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone https://github.com/leonardoaugt/naming_items.git --origin upstream

Maybe the name of repository is naming-items and the name of app is naming_items?

You have not created the repository correctly.

For now, you can clone the app in another directory (for eg. /home/user/) and copy the same into frappe-bench/apps/ directory.

You can read these guidelines when publishing on GitHub next time.

Thank you for reply!
I’ll follow the guide.

Basically, just remember to keep repository name same as app name and git push from inside the app’s directory.

Sorry for late.
My repo is configured but i got this error:

frappe@erpnext:~/frappe-bench$ bench get-app naming_items https://github.com/leonardoaugt/naming_items.git
INFO:bench.app:getting app naming_items
INFO:bench.utils:git clone https://github.com/leonardoaugt/naming_items.git --origin upstream
Cloning into ‘naming_items’…
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 12 (delta 0), reused 12 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.
Checking connectivity… done.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘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 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/make.py”, line 30, in get_app
get_app(git_url, branch=branch)
File “/home/frappe/bench-repo/bench/app.py”, line 69, in get_app
with open(app_path, ‘rb’) as f:
IOError: [Errno 2] No such file or directory: u’./apps/naming_items/setup.py’

This give me error but downloaded the folder:

I just can’t install that cause this is not in bench list-apps:

I edited the apps.txt on frappe-bench/sites/apps.txt but i got this error after trying install:

frappe@erpnext:~/frappe-bench$ bench install-app naming_items
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 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, 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 1066, 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 895, 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 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/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/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 152, in install_app
_install_app(app, verbose=context.verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 100, in install_app
frappe.clear_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 468, in clear_cache
frappe.sessions.clear_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/sessions.py”, line 45, in clear_cache
clear_global_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/sessions.py”, line 53, in clear_global_cache
frappe.setup_module_map()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 830, in setup_module_map
for module in get_module_list(app):
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 704, 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 662, 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 naming_items
frappe@erpnext:~/frappe-bench$

Use the following,

No need of extra argument for app name, drop naming-items on latest bench

also avoid hypen, use underscore

frappe@erpnext:~/frappe-bench$ bench get-app https://github.com/leonardoaugt/naming_items
INFO:bench.app:getting app naming_items
INFO:bench.utils:git clone https://github.com/leonardoaugt/naming_items --origin upstream
Cloning into ‘naming_items’…
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 12 (delta 0), reused 12 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.
Checking connectivity… done.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘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 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/make.py”, line 30, in get_app
get_app(git_url, branch=branch)
File “/home/frappe/bench-repo/bench/app.py”, line 69, in get_app
with open(app_path, ‘rb’) as f:
IOError: [Errno 2] No such file or directory: u’./apps/naming_items/setup.py’

git clone it’s ok:

frappe@erpnext:~/frappe-bench/apps$ git clone https://github.com/leonardoaugt/naming_items
Cloning into ‘naming_items’…
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 12 (delta 0), reused 12 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.
Checking connectivity… done.

But this is not same of bench get-app, so:
frappe@erpnext:~/frappe-bench$ bench install-app naming_items
Could not find app “naming_items”

Im done.
In bench get-app [Errno 2] No such file or directory: u’./apps/naming_items/setup.py_
I had another files out of the folder ‘naming_series’
So i added this files:

Your app installed as expected on a freshly installed frappe-bench!

revant@revant-laptop:~/frappe-bench$ ls apps/
erpnext  frappe 
revant@revant-laptop:~/frappe-bench$ bench get-app https://github.com/leonardoaugt/naming_items
INFO:bench.app:getting app naming_items
INFO:bench.utils:git clone https://github.com/leonardoaugt/naming_items  --depth 1 --origin upstream
Cloning into 'naming_items'...
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 18 (delta 0), reused 18 (delta 0), pack-reused 0
Unpacking objects: 100% (18/18), done.
('installing', u'naming_items')
INFO:bench.app:installing naming_items
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/naming_items --no-cache-dir
Wrote css/frappe-web.css - 64.95 KB
Wrote js/frappe-web.min.js - 138.62 KB
Wrote js/dialog.min.js - 94.68 KB
Wrote css/desk.min.css - 280.95 KB
Wrote css/frappe-rtl.css - 31.78 KB
Wrote js/libs.min.js - 814.29 KB
Wrote js/desk.min.js - 384.08 KB
Wrote js/d3.min.js - 380.17 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 185.93 KB
Wrote css/list.min.css - 15.72 KB
Wrote js/list.min.js - 145.52 KB
Wrote css/report.min.css - 7.77 KB
Wrote js/report.min.js - 255.37 KB
Wrote js/web_form.min.js - 247.45 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.3 KB
Wrote css/erpnext.css - 7.87 KB
Wrote js/erpnext-web.min.js - 3.62 KB
Wrote js/erpnext.min.js - 115.87 KB
Wrote js/item-dashboard.min.js - 7.65 KB
revant@revant-laptop:~/frappe-bench$ ls apps/
erpnext  frappe  naming_items

To manually clone use command

revant@revant-laptop:~/frappe-bench/apps$ git clone https://github.com/leonardoaugt/naming_items --origin upstream

frappe apps have remote called upstream instead of origin which git clone command sets as default

To install app in frappe-bench’s python environment:

revant@revant-laptop:~/frappe-bench$ ./env/bin/pip install -e apps/naming_items --no-cache-dir

To install app on site

revant@revant-laptop:~/frappe-bench$ bench --site <sitename> install-app naming_items
7 Likes

It’s fine, i solved the problem.
My setup.py it was not going up like the screenshot that i post

try if it helps?

sudo chown -R eucon-02:eucon-02 ~/frappe-bench/apps/naming_items/.git/

I solved the problem, if u see the screenshot, I did ‘git add .’ this added all of my documents were out of the folder ‘naming_series’
Thanks for reply my friend :slight_smile:
Can close the topic now.