Instaling Beta Development Setup on mac

While installing using python script i got this error

TASK [install bench] ***********************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/local/bin/pip install -e /Users/sam/.bench", "failed": true, "msg": "\n:stderr: /Users/sam/.bench should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+\n"}

I’m very new to erpnext please help
thanks!

@shreyasp can you check?

@samithaj Can you provide some details like, what command did you execute when you recieved this error message along with a traceback?

@samithaj I have the same error trying to install on a local imac running yosemite 10.10.4 using the Beta Development Setup instructions. Here is the full output of the commands:

imac:~ chris$ curl "https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py" -o install.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3833  100  3833    0     0   3405      0  0:00:01  0:00:01 --:--:--  3407
imac:~ chris$ python install.py --develop
Password:
The directory '/Users/chris/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/chris/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): ansible in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): paramiko in /Library/Python/2.7/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): jinja2 in /Library/Python/2.7/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): PyYAML in /Library/Python/2.7/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /Library/Python/2.7/site-packages/setuptools-21.2.2-py2.7.egg (from ansible)
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.6 in /Library/Python/2.7/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): cryptography>=1.1 in /Library/Python/2.7/site-packages (from paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /Library/Python/2.7/site-packages (from paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /Library/Python/2.7/site-packages (from jinja2->ansible)
Requirement already satisfied (use --upgrade to upgrade): enum34 in /Library/Python/2.7/site-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in /Library/Python/2.7/site-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /Library/Python/2.7/site-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /Library/Python/2.7/site-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.4.1 in /Library/Python/2.7/site-packages (from cryptography>=1.1->paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /Library/Python/2.7/site-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko->ansible)
/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
SUDO password: 
[WARNING]: Host file not found: /etc/ansible/hosts

 [WARNING]: provided hosts list is empty, only localhost is available
 
 
PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [install prequisites] *****************************************************
ok: [localhost] => (item=cmake)
ok: [localhost] => (item=redis)
ok: [localhost] => (item=mariadb)
ok: [localhost] => (item=nodejs)

TASK [cask installs] ***********************************************************
ok: [localhost] => (item=wkhtmltopdf)

TASK [include] *****************************************************************
included: /usr/local/frappe/bench-repo/playbooks/develop/includes/setup_mariadb.yml for localhost

TASK [Install MySQLdb in global env] *******************************************
ok: [localhost]

TASK [Set root Password for Ubuntu] ********************************************
skipping: [localhost] => (item=localhost) 
skipping: [localhost] => (item=127.0.0.1) 
skipping: [localhost] => (item=::1) 

TASK [Add configuration] *******************************************************
ok: [localhost]

TASK [restart mysql linux] *****************************************************
skipping: [localhost]

TASK [add launchagents folder mac] *********************************************
ok: [localhost]

TASK [add mysql to mac startup] ************************************************
ok: [localhost]

TASK [stop mysql mac] **********************************************************
changed: [localhost]

TASK [start mysql mac] *********************************************************
changed: [localhost]

TASK [include] *****************************************************************
included: /usr/local/frappe/bench-repo/playbooks/develop/includes/setup_bench.yml for localhost

TASK [Check if /tmp/.bench exists] *********************************************
ok: [localhost]

TASK [Check if bench_repo_path exists] *****************************************
ok: [localhost]

TASK [move /tmp/.bench if it exists] *******************************************
skipping: [localhost]

TASK [install bench] ***********************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/local/bin/pip install -e /Users/chris/.bench", "failed": true, "msg": "\n:stderr: /Users/chris/.bench should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+\n"}
    to retry, use: --limit @develop/install.retry

PLAY RECAP *********************************************************************
localhost                  : ok=14   changed=2    unreachable=0    failed=1   

Traceback (most recent call last):
      File "install.py", line 153, in <module>
        install_bench(args)
      File "install.py", line 58, in install_bench
    run_playbook('develop/install.yml', sudo=True)
  File "install.py", line 131, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(bench_repo, 'playbooks'))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'develop/install.yml', '-K']' returned non-zero exit status 2
imac:~ chris$

see this Turning a Mac into a Frappe Framework Developer Machine · frappe/bench Wiki · GitHub

edit: I just realized that I replied to the wrong person… sorry @samithaj I meant @shreyasp

Thanks for the suggestion. I followed the instruction on that page and got a failure on item 12: bench update
Here’s the error:

frappe-bench bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling erpnext
From https://github.com/frappe/erpnext
 * branch            master     -> FETCH_HEAD
Already up-to-date.
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/chris/Projects/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/Users/chris/Projects/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/Users/chris/Projects/erpnext/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/chris/Projects/erpnext/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/chris/Projects/erpnext/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/chris/Projects/erpnext/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/chris/Projects/erpnext/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/chris/Projects/erpnext/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/chris/Projects/erpnext/frappe-bench/env/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/chris/Projects/erpnext/frappe-bench/apps/frappe/frappe/commands.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/Users/chris/Projects/erpnext/frappe-bench/apps/frappe/frappe/commands.py", line 895, in backup
    frappe.init(site=site)
  File "/Users/chris/Projects/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 121, in init
    local.conf = _dict(get_site_config())
  File "/Users/chris/Projects/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 173, in get_site_config
    config.update(get_file_json(site_config))
  File "/Users/chris/Projects/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 765, in get_file_json
    return json.load(f)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 381, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting , delimiter: line 4 column 2 (char 64)
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/Users/chris/Projects/erpnext/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/Library/Python/2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Python/2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/chris/Projects/erpnext/bench-repo/bench/commands/update.py", line 61, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/Users/chris/Projects/erpnext/bench-repo/bench/commands/update.py", line 90, in _update
    backup_all_sites(bench=bench_path)
  File "/Users/chris/Projects/erpnext/bench-repo/bench/utils.py", line 382, in backup_all_sites
    backup_site(site, bench=bench)
  File "/Users/chris/Projects/erpnext/bench-repo/bench/utils.py", line 378, in backup_site
    run_frappe_cmd('--site', site, 'backup', bench=bench)
  File "/Users/chris/Projects/erpnext/bench-repo/bench/utils.py", line 491, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'littlebunyip.local', 'backup')
➜  frappe-bench

@Chris_Nuss

Can you please check site_config.json file in sites/littlebunnyip.local and common_site_config.json file in sites folder?

By looking at the error it feels you missed a delimiter ‘,’ in your JSON.

Please let me know, if you still face some problem.

1 Like

Arrrrrrr yes, that was it. I left a ‘,’ off the end of a line in my site_config.json file after editing. Thanks for your help @shreyasp. It’s up and running.

Tell me, how did you know to look in this file from the traceback? I got that there was a comma missing somewhere. Sorry I don’t know how this all works.

Reading the trace!