Issue installing custom app

Hi,

I wanna install Athenolab quality system, but facing this issue:

:~$ bench get-app quality https://github.com/Athenolabs/Quality.git
INFO:bench.app:getting app Quality
INFO:bench.utils:git clone https://github.com/Athenolabs/Quality.git   --origin upstream
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    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 38, in get_app
    get_app(git_url, branch=branch)
  File "/home/frappe/.bench/bench/app.py", line 95, in get_app
    cwd=os.path.join(bench_path, 'apps'))
  File "/home/frappe/.bench/bench/utils.py", line 144, in exec_cmd
    p = subprocess.Popen(cmd, cwd=cwd, shell=True, stdout=stdout, stderr=stderr, universal_newlines=True)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory: './apps'

Somebody can help me with?

Thanks!!

This means you are in the wrong directory:

“OSError: [Errno 2] No such file or directory: ‘./apps’”

bench commands must be run from here:

frappe@ubuntu:~/frappe-bench$ pwd
/home/frappe/frappe-bench
frappe@ubuntu:~/frappe-bench$ ls -al apps/
total 16
drwxr-xr-x 4 frappe frappe 4096 Mar 15 16:08 .
drwxr-xr-x 9 frappe frappe 4096 Mar 21 15:16 …
drwxr-xr-x 9 frappe frappe 4096 Mar 21 16:56 erpnext
drwxr-xr-x 11 frappe frappe 4096 Mar 21 16:56 frappe

However bench commands will run in other directories…

frappe@ubuntu:~/frappe-bench$ cd …
frappe@ubuntu:~$ bench
Usage: bench [OPTIONS] COMMAND [ARGS]…

Bench manager for Frappe

Options:
–version
–help Show this message and exit.

Thanks a lot for your help… I’m learning yet how to deal with this linux commands…

So… I tried to do it as you suggest, and get another error:

xickomesquita@ubuntu-xenial-1:/home/frappe/frappe-bench$ dir
apps  config  env  logs  node_modules  package.json  patches.txt  Procfile  sites
xickomesquita@ubuntu-xenial-1:/home/frappe/frappe-bench$ bench get-app quality https://github.com/Athenolabs/Qualit
y.git
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    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 1063, in invoke
    Command.invoke(self, 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/__init__.py", line 31, in bench_command
    setup_logging(bench_path=bench_path)
  File "/home/frappe/.bench/bench/utils.py", line 321, in setup_logging
    hdlr = logging.FileHandler(log_file)
  File "/usr/lib/python2.7/logging/__init__.py", line 913, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 943, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/home/frappe/frappe-bench/logs/bench.log'

Seams that I have to set some permitions, right? Can you help me with?

Thanks a lot again!!

ok you installed as ‘xickomesquita’ and not ‘frappe’ user:

IOError: [Errno 13] Permission denied: ‘/home/frappe/frappe-bench/logs/bench.log’

To reinstall might be best in your case?

Otherwise a forum search on the above will inform you what to do here…

Hi @xickomesquita

To resolve error 13, run:

$ sudo chown -R frappe:frappe *

on directory frappe/frappe-bench

Or login as root and run the code above without sudo

1 Like

Works… Thanks a lot!!!

1 Like