[Release] Instructions for updating to/staying on v10/v11

A majority of the users still use python 2. But Python 3 is the faster, future-proof option. There might be potential issues for a while with Python 3 though.

1 Like

Okey, will stay with python2. Thanks a lot for fixes and answers!

1 Like

Any reason why I am getting this after upgrading on an instance on a local machine?

Screenshot 2019-01-30 at 12.05.48 AM

I queried my logs and this is what I’m getting:

2019-01-29 10:05:53 +0000] [55790] [ERROR] Error handling request /api/method/fr$
Traceback (most recent call last):
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/$
self.handle_request(listener, req, client, addr)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/$
respiter = self.wsgi(environ, resp.start_response)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/$
return ClosingIterator(app(environ, start_response), self.cleanup)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/$
resp = f(*args[:-2] + (request,))
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 88, in applica$
response = handle_exception(e)
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 143, in handle$
if frappe.local.is_ajax or ‘application/json’ in frappe.get_request_header('A$
TypeError: argument of type ‘NoneType’ is not iterable

Please how do I fix it. I am able to get to the login page and I login successfully but it’s not getting to desk.

UPDATE: I ran bench update --reset and that seems to have fixed the problem


Got this error on bench update

You need to start the bench in another terminal before updating.

1 Like

Please help.
switching staging V11 to master

bench update --patch
Backing up sites…
Patching sites…
Migrating erp…
Executing frappe.patches.v10_0.enhance_security in erp… (0b6666d2184e408b)
Traceback (most recent call last):
File “/usr/lib64/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib64/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/erpnext/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/erpnext/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/erpnext/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/erpnext/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/erpnext/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnext/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/erpnext/env/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/erpnext/erpnext/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/erpnext/erpnext/apps/frappe/frappe/commands/site.py”, line 227, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/erpnext/erpnext/apps/frappe/frappe/migrate.py”, line 38, in migrate
frappe.modules.patch_handler.run_all()
File “/home/erpnext/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/erpnext/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/erpnext/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/erpnext/erpnext/apps/frappe/frappe/patches/v10_0/enhance_security.py”, line 30, in execute
if cint(doc.allow_consecutive_login_attempts) <= 3:
AttributeError: ‘SystemSettings’ object has no attribute ‘allow_consecutive_login_attempts’

Thank you

can anyone help me explain this error? thnks

Try running bench setup requirements and see if this persists.

@snv still same error, Is there a related to the version of Python

@Vari Run this:

env/bin/pip install --upgrade requests[security]

Run this:

bench execute frappe.reload_doc --args "['core','doctype','system_settings',1]"
1 Like

@snv after run that command, still not change . is there another way to update python?

what was the output of that command? it has to be run from the frappe-bench directory.
you needn’t upgrade python version for this, but if you want to:

bench migrate-env python3

1 Like

I was able to upgrade but I cant save and submit a sales order… quote, po, sales and purchase invoice works well. Unable to save Sales order v11.0.3-beta.37 · Issue #16479 · frappe/erpnext · GitHub

Please share the console log.

@snv

This is not the command you’ve to run.

I tried running bench update on new terminal (Host Key + F2), still getting the same error

Apologies, I misread this.

Run:

sudo systemctl restart mariadb

You’ll find more info here:

sudo systemctl status mariadb