V7 on Ubuntu 16.04 Bench Update Error

Hi,

Installed ERPNext V7 on Ubuntu Desktop 16.04. It went through with a little difficulty.

When I run a bench update, I get the following error. Any thoughts? Then when I point my browser to the login screen, I get another error related to ldap. Any thoughts?

Thanks

jay@epoch-jay:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe

  • branch develop -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    From https://github.com/frappe/erpnext
  • branch develop -> FETCH_HEAD
    Already up-to-date.
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Command “/home/jay/frappe-bench/env/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-build-Y9OwkT/python-ldap/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-znwVAZ-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/jay/frappe-bench/env/include/site/python2.7/python-ldap” failed with error code 1 in /tmp/pip-build-Y9OwkT/python-ldap/
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 11, in
    load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
    File “/home/jay/bench-repo/bench/cli.py”, line 40, in cli
    bench_command()
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/jay/bench-repo/bench/commands/update.py”, line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
    File “/home/jay/bench-repo/bench/commands/update.py”, line 79, in _update
    update_requirements(bench_path=bench_path)
    File “/home/jay/bench-repo/bench/utils.py”, line 375, in update_requirements
    install_requirements(pip, req_file)
    File “/home/jay/bench-repo/bench/utils.py”, line 379, in install_requirements
    exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
    File “/home/jay/bench-repo/bench/utils.py”, line 127, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/frappe/requirements.txt

Here’s the ldap error:

Traceback (most recent call last):
File “/home/jay/frappe-bench/apps/frappe/frappe/website/render.py”, line 32, in render
data = render_page_by_language(path)
File “/home/jay/frappe-bench/apps/frappe/frappe/website/render.py”, line 101, in render_page_by_language
return render_page(path)
File “/home/jay/frappe-bench/apps/frappe/frappe/website/render.py”, line 117, in render_page
return build(path)
File “/home/jay/frappe-bench/apps/frappe/frappe/website/render.py”, line 124, in build
return build_page(path)
File “/home/jay/frappe-bench/apps/frappe/frappe/website/render.py”, line 137, in build_page
context = get_context(path)
File “/home/jay/frappe-bench/apps/frappe/frappe/website/context.py”, line 19, in get_context
context = build_context(context)
File “/home/jay/frappe-bench/apps/frappe/frappe/website/context.py”, line 65, in build_context
module = frappe.get_module(context.controller)
File “/home/jay/frappe-bench/apps/frappe/frappe/init.py”, line 646, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/home/jay/frappe-bench/apps/frappe/frappe/www/login.py”, line 11, in
from frappe.integrations.ldap_auth import get_ldap_settings
File “/home/jay/frappe-bench/apps/frappe/frappe/integrations/ldap_auth.py”, line 2, in
import ldap, json
ImportError: No module named ldap

read that issue:

Your response only addresses the ldap issue. Anybody can help me with the bench update issue.

The ldap suggestion threw up the following error:

jay@epoch-jay:~/frappe-bench$ bench remove-from-installed-apps ldap
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/jay/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/jay/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/jay/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/jay/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/jay/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/jay/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/jay/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/jay/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/jay/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/jay/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/jay/frappe-bench/apps/frappe/frappe/commands/site.py”, line 279, in remove_from_installed_apps
for site in context.sites:
TypeError: ‘NoneType’ object is not iterable