ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Error while installing new site


We are installing a new frappe instance.
New bench and frappe version (developer). Ubuntu 18.4
When we define the new site we get an mysql error. The mariadb is fresh and connecting well.
What can we do?
Any help is appreciated.

Updating DocTypes for frappe        : [=======                                 Updating DocTypes for frappe        : [=======                                 ]Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/srv/bench/erptest/apps/frappe/frappe/utils/", line 97, in <module>
  File "/srv/bench/erptest/apps/frappe/frappe/utils/", line 18, in main
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/click/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/click/", line 717, in main
    rv = self.invoke(ctx)
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/click/", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/click/", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/click/", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/click/", line 555, in invoke
    return callback(*args, **kwargs)
  File "/srv/bench/erptest/apps/frappe/frappe/commands/", line 33, in new_site
    db_type = db_type)
  File "/srv/bench/erptest/apps/frappe/frappe/commands/", line 70, in _new_site
    _install_app(app, verbose=verbose, set_as_patched=not source_sql)
  File "/srv/bench/erptest/apps/frappe/frappe/", line 84, in install_app
    sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
  File "/srv/bench/erptest/apps/frappe/frappe/model/", line 56, in sync_for
    reset_permissions=reset_permissions, for_sync=True)
  File "/srv/bench/erptest/apps/frappe/frappe/modules/", line 66, in import_file_by_path
    ignore_version=ignore_version, reset_permissions=reset_permissions)
  File "/srv/bench/erptest/apps/frappe/frappe/modules/", line 141, in import_doc
  File "/srv/bench/erptest/apps/frappe/frappe/model/", line 258, in insert
  File "/srv/bench/erptest/apps/frappe/frappe/model/", line 917, in run_post_save_methods
  File "/srv/bench/erptest/apps/frappe/frappe/model/", line 786, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/srv/bench/erptest/apps/frappe/frappe/model/", line 1055, in composer
    return composed(self, method, *args, **kwargs)
  File "/srv/bench/erptest/apps/frappe/frappe/model/", line 1038, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/srv/bench/erptest/apps/frappe/frappe/model/", line 780, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/srv/bench/erptest/apps/frappe/frappe/core/doctype/doctype/", line 279, in on_update
  File "/srv/bench/erptest/apps/frappe/frappe/core/doctype/doctype/", line 348, in run_module_method
    getattr(module, method)()
  File "/srv/bench/erptest/apps/frappe/frappe/core/doctype/communication/", line 289, in on_doctype_update
    frappe.db.add_index("Communication Link", ["link_doctype", "link_name"])
  File "/srv/bench/erptest/apps/frappe/frappe/database/mariadb/", line 253, in add_index
    if not self.has_index(table_name, index_name):
  File "/srv/bench/erptest/apps/frappe/frappe/database/mariadb/", line 245, in has_index
  File "/srv/bench/erptest/apps/frappe/frappe/database/", line 171, in sql
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/pymysql/", line 170, in execute
    result = self._query(query)
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/pymysql/", line 328, in _query
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/pymysql/", line 517, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/pymysql/", line 732, in _read_query_result
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/pymysql/", line 1075, in read
    first_packet = self.connection._read_packet()
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/pymysql/", line 684, in _read_packet
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/pymysql/", line 220, in check_error
  File "/srv/bench/erptest/env/local/lib/python2.7/site-packages/pymysql/", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, u"Table '_b409e168a2d2f22c.tabCommunication Link' doesn't exist")


See this link…


I suspect that the problem was caused by a ubuntu apt update. I suppose that that loads some veriosn of a python library that causes the problem.

When I do a new fresh ubuntu install (partly following the how to you refer to) it is working.

I have the feeling that that is one of the python disadvantages.

Thanks anyhow.

Met vriendelijke groeten, Kind regards,

Braedius Medical BV
Bikbergerweg 18
1272 PM Huizen,The Netherlands
Phone: +31(0)358876100
Mobile: +31654665520


    May 31

See this link…

[New installation Issue]( [ERPNext](

Try following the instructions on this guide -’s-Guide-to-Installing-Frappé-on-Linux

We have been consistently successful with it. If you are familiar with basic Python development, you may want to also set up a virtualenv just before running pip install -e ./bench

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

On Fri, 31/05/2019 07:40 AM, Trent Murgatroyd wrote:

Email sent using Axigen Free Mail Server: