Hi All
first of all, thank you for this wonderful piece of software!
I’m using the VM version of erpnext v11. I wanted to upgrade to v12. Before doing so, I migrated to python 3.5 with bench migrate-env python3.5
which worked fine. I had to install a newer version of openssl 1.1.1c (compiled from source) and then uninstall the python cryptography from the virtualenv. I reinstalled it with pip install pyOpenSSL cryptography --no-cache-dir
otherwise it was still using the 1.0.1j version. After that, everything was running fine.
Now to the upgrade process. My steps were as follow:
bench switch-to-branch version-12 frappe erpnext --upgrade
bench update --patch
bench setup requirements
bench --site [your-site-name] migrate
bench restart
The first command ran fine but the problem appears at the second one. (the later 3 commands weren’t used)
console log
frappe@erpnext:~/frappe-bench$ bench update --patch
Backing up sites...
Patching sites...
Migrating erpnext.vm
Executing erpnext.patches.v12_0.set_priority_for_support in erpnext.vm (d56cb677eaab3383)
Traceback (most recent call last):
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/frappe/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/frappe/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/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 233, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 48, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 41, in run_all
run_patch(patch)
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 30, in run_patch
if not run_single(patchmodule = patch):
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 71, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 91, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v12_0/set_priority_for_support.py", line 7, in execute
set_issue_priority()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v12_0/set_priority_for_support.py", line 14, in set_issue_priority
for priority in frappe.get_meta("Issue").get_field("priority").options.split("\n"):
AttributeError: 'NoneType' object has no attribute 'options'
After I was commenting out the patches in the set_priority_for_support.py
so that it passed the update. I reran bench update --patch
and antoher error occured:
console log
frappe@erpnext:~/frappe-bench$ bench update --patch
Backing up sites...
Patching sites...
Migrating erpnext.vm
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Updating customizations for Address
Generating Website Theme Files...
Compiling Python Files...
*** Error compiling '../apps/erpnext_demo/erpnext_demo/make_demo.py'...
File "../apps/erpnext_demo/erpnext_demo/make_demo.py", line 42
print "Creating Fresh Database..."
^
SyntaxError: Missing parentheses in call to 'print'
INFO:bench.utils:sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-frappe-schedule: stopped
frappe-bench-frappe-default-worker-0: stopped
frappe-bench-frappe-long-worker-0: stopped
frappe-bench-frappe-schedule: ERROR (abnormal termination)
frappe-bench-frappe-default-worker-0: ERROR (abnormal termination)
frappe-bench-frappe-long-worker-0: ERROR (abnormal termination)
frappe-bench-frappe-short-worker-0: ERROR (abnormal termination)
frappe-bench-frappe-schedule: started
frappe-bench-node-socketio: ERROR (abnormal termination)
frappe-bench-frappe-web: started
________________________________________________________________________________
Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community
()
Now I’m lost on how to proceed further since I don’t want to break the update more than necessary.
The website currently shows the following picture:
and the network log shows most of the css and js files are not found (404), which is clear since the server is halfway down.
after login it shows the following error:
Session Start Failed 'ascii' codec can't decode byte 0xe2 in position 167281: ordinal not in range(128)
which probably is also related to the missing parts of the server.
I’d be very happy if you could shed some light on how to proceed with the upgrade steps.
Best regards
Simon