Error on trying to login

hi guys am getting this error when I try to log in…

Traceback (most recent call last):
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 45, in render_
_ frappe.local.form_dict.name = name_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 139, in render_page_by_language_
_ if can_cache():_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 155, in render_page_
_ try:_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 162, in build_
_ else:_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 181, in build_page_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/jinja.py”, line 69, in render_template_
_ return get_jenv().from_string(template).render(context)_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 1008, in render_
_ return self.environment.handle_exception(exc_info, True)_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 780, in handle_exception_
_ reraise(exc_type, exc_value, tb)_
_ File “”, line 1, in top-level template code_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/web.html”, line 1, in top-level template code_
_ {% extends base_template_path %}_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/base.html”, line 103, in top-level template code_
_ {%- block script %}{%- endblock %}_
_ File “”, line 98, in block “script”_
_ File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/includes/login/login.js”, line 61, in top-level template code_
_ args.cmd = “{{ ldap_settings.method }}”;_
_ File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 430, in getattr_
_ return getattr(obj, attribute)_
UndefinedError: ‘ldap_settings’ is undefined

kindly help which is the issue here?

Have you installed python-ldap?

thank for your reply … I dont know if it install but I have been using the system and I noted this issue this morning…

can i install it now?

sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

might work, or

sudo pip install python-ldap

am getting this error when I run sudo pip install python-ldap…

sudo pip install python-ldap
Collecting python-ldap
_ Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff697990>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)': /simple/python-ldap/
_ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff6975d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)': /simple/python-ldap/
_ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff636fd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)': /simple/python-ldap/
_ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff6360d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)': /simple/python-ldap/
_ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff636990>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)': /simple/python-ldap/
_ Could not find a version that satisfies the requirement python-ldap (from versions: )_
No matching distribution found for python-ldap

what could be the issue here

Try the 1st command AND the other one - maybe a missing xxx-dev library

here is the outcome after running both…

sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libsasl2-dev is already the newest version (2.1.26.dfsg1-14build1).
libldap2-dev is already the newest version (2.4.42+dfsg-2ubuntu3.3).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.13).
python-dev is already the newest version (2.7.12-1~16.04).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

and on the second

sudo pip install python-ldap
Collecting python-ldap
_ Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff697990>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)’: /simple/python-ldap/
_ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff6975d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)’: /simple/python-ldap/
_ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff636fd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)’: /simple/python-ldap/
_ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff6360d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)’: /simple/python-ldap/
_ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip.vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7fff636990>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)’: /simple/python-ldap/
_ Could not find a version that satisfies the requirement python-ldap (from versions: )_
No matching distribution found for python-ldap

Sorry - I don’t know what else can work here. You could try this, but beyond it I can’t be of much help.

sudo pip install --upgrade setuptools
sudo pip install --upgrade urllib3
sudo pip install --upgrade python-ldap

thank you for coming through …

am now getting a new error when I run the last command above…

_

Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Max retries exceeded with url: /packages/7f/1c/28d721dff2fcd2fef9d55b40df63a00be26ec8a11e8c6fc612ae642f9cfd/python-ldap-3.1.0.tar.gz (Caused by NewConnectionError(‘<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92ddca4750>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,))

_

If I go to the referenced link, it forwards to pypi.python.org - this site took a long time to load - so it’s possible it is just a temporary issue with DNS or the site is undergoing maintenance

am trying to bench migrate site1.local using bench --site site1.local migrate and am getting this error…

frappe@vultr:~/frappe-bench$ bench --site site1.local migrate
Migrating site1.local
Updating DocTypes for frappe : [ ]Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
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/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/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 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 33, in migrate
frappe.model.sync.sync_all(verbose=verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py”, line 19, in sync_all
sync_for(app, force, verbose=verbose, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py”, line 45, in sync_for
reset_permissions=reset_permissions, for_sync=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 58, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 132, in import_doc
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 240, in insert
d.db_insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 303, in db_insert
), list(d.values()))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 166, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 165, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 321, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 860, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1061, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1349, in read
first_packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1018, in _read_packet
packet.check_error()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 384, in check_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1048, u"Column ‘allow_in_quick_entry’ cannot be null")

could this be related to the ldap issue I had?

thank you I followed that and now system is updating but now when I try to login the login form does not load…

hence I cant fill in my credentials…what the issue here…

kindly help

solved this by running bench update again…

Thanks guys I was able to solve all issues here…