Error related to footer in ERPNext Test Instance

Hi Everyone,
I have a test instance installed under Virtual Machine on Ubuntu.
Everything was working fine, but when I did a bench update today, I am receiving this error.
Does, anybody have an idea about it?



Traceback (innermost last):
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 18, in savedocs
    doc.save()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 231, in save
    self.insert()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 209, in insert
    self.run_method("after_insert")
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 557, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 712, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 697, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py", line 67, in trigger_email_alerts
    evaluate_alert(doc, alert, eevent)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py", line 119, in evaluate_alert
    attachments = [frappe.attach_print(doc.doctype, doc.name)] if alert.attach_print else None)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 1037, in attach_print
    "fcontent": get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 1017, in get_print
    html = build_page("print")
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/render.py", line 127, in build_page
    context = get_context(path)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/context.py", line 16, in get_context
    context = build_context(context)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/context.py", line 54, in build_context
    ret = module.get_context(context)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 37, in get_context
    no_letterhead=frappe.form_dict.no_letterhead),
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 109, in get_html
    letter_head = frappe._dict(get_letter_head(doc, no_letterhead) or {})
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 168, in get_letter_head
    return frappe.db.get_value("Letter Head", {"is_default": 1}, ["content", "footer"], as_dict=True) or {}
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 396, in get_value
    ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug, cache=cache)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 437, in get_values
    out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 549, in _get_values_from_table
    conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 135, in sql
    self._cursor.execute(query, values)
  File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
 OperationalError: (1054, "Unknown column 'footer' in 'field list'")

Traceback (innermost last):
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/app.py", line 69, in application
    response = frappe.handler.handle()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 20, in handle
    execute_cmd(cmd)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 37, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 801, in call
    return fn(*args, **newargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 18, in savedocs
    doc.save()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 231, in save
    self.insert()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 209, in insert
    self.run_method("after_insert")
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 557, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 712, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 697, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py", line 67, in trigger_email_alerts
    evaluate_alert(doc, alert, eevent)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py", line 119, in evaluate_alert
    attachments = [frappe.attach_print(doc.doctype, doc.name)] if alert.attach_print else None)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 1037, in attach_print
    "fcontent": get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 1017, in get_print
    html = build_page("print")
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/render.py", line 127, in build_page
    context = get_context(path)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/context.py", line 16, in get_context
    context = build_context(context)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/context.py", line 54, in build_context
    ret = module.get_context(context)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 37, in get_context
    no_letterhead=frappe.form_dict.no_letterhead),
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 109, in get_html
    letter_head = frappe._dict(get_letter_head(doc, no_letterhead) or {})
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 168, in get_letter_head
    return frappe.db.get_value("Letter Head", {"is_default": 1}, ["content", "footer"], as_dict=True) or {}
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 396, in get_value
    ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug, cache=cache)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 437, in get_values
    out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 549, in _get_values_from_table
    conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 135, in sql
    self._cursor.execute(query, values)
  File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
 OperationalError: (1054, "Unknown column 'footer' in 'field list'")


Regards
Ruchin Sharma

You have to also migrate your sites after pulling the repos.

Do bench --site all migrate

1 Like