Error while migrating to v5

File “/home/frappe/bench-repo/bench/cli.py”, line 55, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 236, in update
update_requirements()
File “/home/frappe/bench-repo/bench/utils.py”, line 308, in update_requirements
exec_cmd(“{pip} install -q -r {req_file}”.format(pip=pip, req_file=req_file))
File “/home/frappe/bench-repo/bench/utils.py”, line 72, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘./env/bin/pip install -q -r ./apps/frappe/requirements.txt’ returned n
on-zero exit status 2
frappe@instance-4:~/frappe-bench$

Can you post the full trace?

i tried to install v5 on a fresh machine using this modified easy install script
*frappe and erp branches were v5.0 and bench branch is master.
also i tried to update an existing v4 system to v5 using “$ bench migrate-to-v5” and got the same error.
here is my custom script.

$ sudo bash setup_frappe.sh --setup-production
Installing for debian 7 amd64
In case you encounter an error, you can post on https://discuss.frappe.io
Adding debian mariadb repo
Installing packages for debian. This might take time…
Installing wkhtmltopdf
[ ok ] Stopping MariaDB database server: mysqld.
[ ok ] Starting MariaDB database server: mysqld …
[info] Checking for corrupt, not cleanly closed and upgrade needing tables…
Adding frappe user
Installing frappe-bench
Already using interpreter /usr/bin/python
Cloning into ‘frappe’…
no crontab for frappe
installing frappe
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 55, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 158, in init
no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch)
File “/home/frappe/bench-repo/bench/utils.py”, line 65, in init
install_apps_from_path(apps_path, bench=path)
File “/home/frappe/bench-repo/bench/app.py”, line 164, in install_apps_from_path
apps = get_apps_json(path)
File “/home/frappe/bench-repo/bench/app.py”, line 173, in get_apps_json
with open(path) as f:
IOError: [Errno 2] No such file or directory: u’file:///home/frappe/erpnext-apps-master.json’
frappe@instance-3:~$

i guess my error is partially related to this post but i am unable to get through

ERPNEXT_APPS_JSON="file:///home/frappe/erpnext-apps-master.json"

is the wrong way to do it. Just keep it /home/frappe/erpnext-apps-master.json

trying again. also wanted to know how to ‘$sudo bench patch mariadb-config’, because all branches of frappe/bench give the same error ‘mariadb-config command not found’.

We’ve removed that command. Why are you customizing the install script? What do you want to change?

i wanted to install version 5.0 but was unable to to using traditional method, now it is installed, thanks.
but i am unable to login using Administrator password, i guess it is again just a stupid small thing that i am missing or it has something to do with the same database UTF-8 patch. If that command is deleted, it it required to patch the database?
IP http://104.155.230.225/
Frappe/ERPNext is installed successfully and is running on port 80.
Frappe password: O2bBPwKxCqkLUTGD
MariaDB root password: AcXwrWDBvpiiUjdG
Administrator password: 5OezVWoh2MYamml9
this is just a test VPS and will be deleted after testing so i don’t mind sharing passwords.

checked and now solved. i ran the setup script more than once, maybe that is what giving me error. re-installing again. but do i need to patch the database or that is already taken care of?

edit: still not able to login after reinstalling on a fresh VPS in one go. It shows “invalid login”

bench set-admin-password yournewpassword

to reset the admin password

2 Likes