Hi All,
I have an issue while I try to deploy my frappe and erpnext from my GitHub repo to one of my GCP Compute Engine VM Instance.
The error message showed as below whenever I try to clone the repo to the VM
" File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main",
" "main", mod_spec)“,
" File "/usr/lib/python3.5/runpy.py", line 85, in _run_code”,
" exec(code, run_globals)“,
" File "/home/username/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in ”,
" main()“,
" File "/home/username/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main”,
" click.Group(commands=commands)(prog_name=‘bench’)“,
" File "/home/username/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 764, in call”,
" return self.main(*args, **kwargs)“,
" File "/home/username/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 717, in main”,
" rv = self.invoke(ctx)“,
" File "/home/username/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 1137, in invoke”,
" return _process_result(sub_ctx.command.invoke(sub_ctx))“,
" File "/home/username/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 1137, in invoke”,
" return _process_result(sub_ctx.command.invoke(sub_ctx))“,
" File "/home/username/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 956, in invoke”,
" return ctx.invoke(self.callback, **ctx.params)“,
" File "/home/username/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 555, in invoke”,
" return callback(*args, **kwargs)“,
" File "/home/username/frappe-bench/apps/frappe/frappe/commands/site.py", line 32, in new_site”,
" db_type=db_type)“,
" File "/home/username/frappe-bench/apps/frappe/frappe/commands/site.py", line 51, in _new_site”,
" import frappe.utils.scheduler",
" File "/home/username/frappe-bench/apps/frappe/frappe/utils/scheduler.py", line 23, in “,
" from frappe.core.doctype.user.user import STANDARD_USERS”,
" File "/home/username/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 529",
" ret = [ role.get("name") for role in roles ]“,
" ^”,
“TabError: inconsistent use of tabs and spaces in indentation”
],
“stdout”: “”,
“stdout_lines”:
}PLAY RECAP *******************************************************************************************************************************************************************
localhost : ok=75 changed=18 unreachable=0 failed=1 skipped=64 rescued=0 ignored=0Traceback (most recent call last):
File “install.py”, line 489, in
install_bench(args)
File “install.py”, line 275, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 405, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=username’]’ returned non-zero exit status 2
disclaimer: I didn’t touch anything from the user.py file.
FYI I refer to de docs easy installation provided by frappe from their GitHub repo, these are the deployment steps that I did to my VM.
- run below command
apt install python3-minimal build-essential python3-setuptools
note: from the root directory or frappe - after all installation finished, run the below command
wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
note: from the wherever directory - run below command to continue
sudo pip3 install --upgrade pip
- then run below command to setup frappe and erpnext from your repo
sudo python3 install.py --production --site my-site --user username --frappe-repo-url myfrappe-repo-url.git --erpnext-repo-url myerpnext-repo-url.git --verbose --overwrite --frappe-branch master --erpnext-branch master
note: if its fail please run this command first before installation sudo pip3 install cryptography
Is there anything that I missed guys? Or can anyone give any insight to solve this issue?
Really appreciate if someone can give some insights or suggestion on how to solve the issue from your experiences.