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.
Okey, will stay with python2. Thanks a lot for fixes and answers!
Any reason why I am getting this after upgrading on an instance on a local machine?
Screenshot 2019-01-30 at 12.05.48 AMI 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
You need to start the bench in another terminal before updating.
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
Try running bench setup requirements
and see if this persists.
Run this:
bench execute frappe.reload_doc --args "['core','doctype','system_settings',1]"
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
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.
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