Error installing erpnext

TASK [bench : Create a new site] ***********************************************
skipping: [localhost]

TASK [bench : Install ERPNext to default site] *********************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “–site”, “site1.local”, “install-app”, “erpnext”], “delta”: “0:00:01.541774”, “end”: “2019-03-20 18:19:23.414661”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2019-03-20 18:19:21.872887”, “stderr”: “Traceback (most recent call last):\n File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main\n “main”, mod_spec)\n File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code\n exec(code, run_globals)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in \n main()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main\n click.Group(commands=commands)(prog_name=‘bench’)\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 764, in call\n return self.main(*args, **kwargs)\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 717, in main\n rv = self.invoke(ctx)\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 956, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke\n return callback(*args, **kwargs)\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py”, line 17, in new_func\n return f(get_current_context(), *args, **kwargs)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func\n ret = f(frappe._dict(ctx.obj), *args, **kwargs)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/commands/site.py”, line 169, in install_app\n _install_app(app, verbose=context.verbose)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/installer.py”, line 52, in install_app\n frappe.clear_cache()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/init.py”, line 555, in clear_cache\n frappe.cache_manager.clear_user_cache()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 33, in clear_user_cache\n clear_global_cache()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 39, in clear_global_cache\n clear_website_cache()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/website/render.py”, line 291, in clear_cache\n for method in frappe.get_hooks(“website_clear_cache”):\n File “/home/afsana/frappe-bench/apps/frappe/frappe/init.py”, line 931, in get_hooks\n hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))\n File “/home/afsana/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 79, in get_value\n val = generator()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/init.py”, line 905, in load_app_hooks\n for app in [app_name] if app_name else get_installed_apps(sort=True):\n File “/home/afsana/frappe-bench/apps/frappe/frappe/init.py”, line 869, in get_installed_apps\n installed = json.loads(db.get_global(“installed_apps”) or “[]”)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 684, in get_global\n return self.get_default(key, user)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 688, in get_default\n d = self.get_defaults(key, parent)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 706, in get_defaults\n defaults = frappe.defaults.get_defaults(parent)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/defaults.py”, line 77, in get_defaults\n globald = get_defaults_for()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/defaults.py”, line 204, in get_defaults_for\n where parent = %s order by creation”"", (parent,), as_dict=1)\n File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 121, in sql\n self.connect()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 74, in connect\n self._conn = self.get_connection()\n File “/home/afsana/frappe-bench/apps/frappe/frappe/database/mariadb/database.py”, line 87, in get_connection\n local_infile = frappe.conf.local_infile)\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/init.py”, line 94, in Connect\n return Connection(*args, **kwargs)\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 325, in init\n self.connect()\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 599, in connect\n self._request_authentication()\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 861, in _request_authentication\n auth_packet = self._read_packet()\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 684, in _read_packet\n packet.check_error()\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/protocol.py”, line 220, in check_error\n err.raise_mysql_exception(self._data)\n File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception\n raise errorclass(errno, errval)\npymysql.err.OperationalError: (1045, “Access denied for user ‘_1bd3e0294da19198’@‘localhost’ (using password: YES)”)", “stderr_lines”: [“Traceback (most recent call last):”, " File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main", " “main”, mod_spec)", " File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code", " exec(code, run_globals)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in “, " main()”, " File “/home/afsana/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main", " click.Group(commands=commands)(prog_name=‘bench’)", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 764, in call", " return self.main(*args, **kwargs)", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 717, in main", " rv = self.invoke(ctx)", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke", " return _process_result(sub_ctx.command.invoke(sub_ctx))", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke", " return _process_result(sub_ctx.command.invoke(sub_ctx))", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 956, in invoke", " return ctx.invoke(self.callback, **ctx.params)", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke", " return callback(*args, **kwargs)", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py”, line 17, in new_func", " return f(get_current_context(), *args, **kwargs)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func", " ret = f(frappe._dict(ctx.obj), *args, **kwargs)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/commands/site.py”, line 169, in install_app", " _install_app(app, verbose=context.verbose)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/installer.py”, line 52, in install_app", " frappe.clear_cache()", " File “/home/afsana/frappe-bench/apps/frappe/frappe/init.py”, line 555, in clear_cache", " frappe.cache_manager.clear_user_cache()", " File “/home/afsana/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 33, in clear_user_cache", " clear_global_cache()", " File “/home/afsana/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 39, in clear_global_cache", " clear_website_cache()", " File “/home/afsana/frappe-bench/apps/frappe/frappe/website/render.py”, line 291, in clear_cache", " for method in frappe.get_hooks(“website_clear_cache”):", " File “/home/afsana/frappe-bench/apps/frappe/frappe/init.py”, line 931, in get_hooks", " hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))", " File “/home/afsana/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 79, in get_value", " val = generator()", " File “/home/afsana/frappe-bench/apps/frappe/frappe/init.py”, line 905, in load_app_hooks", " for app in [app_name] if app_name else get_installed_apps(sort=True):", " File “/home/afsana/frappe-bench/apps/frappe/frappe/init.py”, line 869, in get_installed_apps", " installed = json.loads(db.get_global(“installed_apps”) or “[]”)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 684, in get_global", " return self.get_default(key, user)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 688, in get_default", " d = self.get_defaults(key, parent)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 706, in get_defaults", " defaults = frappe.defaults.get_defaults(parent)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/defaults.py”, line 77, in get_defaults", " globald = get_defaults_for()", " File “/home/afsana/frappe-bench/apps/frappe/frappe/defaults.py”, line 204, in get_defaults_for", " where parent = %s order by creation""", (parent,), as_dict=1)", " File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 121, in sql", " self.connect()", " File “/home/afsana/frappe-bench/apps/frappe/frappe/database/database.py”, line 74, in connect", " self._conn = self.get_connection()", " File “/home/afsana/frappe-bench/apps/frappe/frappe/database/mariadb/database.py”, line 87, in get_connection", " local_infile = frappe.conf.local_infile)", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/init.py”, line 94, in Connect", " return Connection(*args, **kwargs)", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 325, in init", " self.connect()", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 599, in connect", " self._request_authentication()", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 861, in _request_authentication", " auth_packet = self._read_packet()", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 684, in _read_packet", " packet.check_error()", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/protocol.py”, line 220, in check_error", " err.raise_mysql_exception(self._data)", " File “/home/afsana/frappe-bench/env/lib/python3.6/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception", " raise errorclass(errno, errval)", “pymysql.err.OperationalError: (1045, “Access denied for user ‘_1bd3e0294da19198’@‘localhost’ (using password: YES)”)”], “stdout”: “”, “stdout_lines”: []}
to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *********************************************************************
localhost : ok=50 changed=9 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 425, in
install_bench(args)
File “install.py”, line 122, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 338, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=afsana’]’ returned non-zero exit status 2

I assume you are installing on an ubuntu 18.x machine?
Some of you lines indicate python 2.7 and others show 3.6.

The errors you have indicate a python mismatch and if you check the forum, you’ll find several cases where downgrading to python 2.7 solved the problem.

I have done it, thanks

@Afsana_Khan i have same problem.Kindly throw more light how you solved this problem

Can you share/show the traceback screens?

here is it
Traceback (most recent call last):
File “install.py”, line 432, in
install_bench(args)
File “install.py”, line 128, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 344, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=fred’]’ returned non-zero exit status 1

Is this an install using easy-script on ubuntu 18.xx?
As which user are you running the install?

yes it an easy i stall script on ubuntu 14.04.I used 18.04 earlier,i had same issue.
I created a root user fred