[18/11/2017] Bench update error on last develop

Hi all,

i’m getting an error on last bench update on develop branch, tracelog:

Executing frappe.patches.v9_1.revert_domain_settings in is.dev (isdev_db)
Success
Executing erpnext.patches.v9_0.update_employee_loan_details in is.dev (isdev_db)
Success
Executing erpnext.patches.v9_2.delete_healthcare_domain_default_items in is.dev (isdev_db)
Success
Executing erpnext.patches.v9_1.create_issue_opportunity_type in is.dev (isdev_db)
Success
Executing erpnext.patches.v9_2.rename_translated_domains_in_en in is.dev (isdev_db)
Success
Executing erpnext.patches.v9_0.set_shipping_type_for_existing_shipping_rules in is.dev (isdev_db)
Success
Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [=========================               ]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 <module>
    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 245, in insert
    self.run_post_save_methods()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods
    self.run_method("on_update")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 206, in on_update
    updatedb(self.name, self)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 76, in updatedb
    tab.sync()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 155, in sync
    self.alter()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 354, in alter
    raise e
pymysql.err.DataError: (1265, u"Data truncated for column 'supplier_delivery_id' at row 1")

Any hint?

Thx

edit: my bad it is a custom field :grimacing:

One quick question JoEz if you can shed light here -

Since we know a custom field caused the error here, I read your traceback for pointers that would indicate and confirm that.

But I spotted nothing since I am not (yet) familiar with whether or how that is even possible to identify here.

So my question is: Is there any ‘telltale’ method in the traceback one can look for to identify that?

Or did you simply recognize this as your custom field?

pymysql.err.DataError: (1265, u"Data truncated for column ‘supplier_delivery_id’ at row 1")

Thanks for any ideas or insight…as a learning for curious folks to troubleshoot - thanks

That’s the answer …it took me a bit to find out. For some reason field type in the DB was different than the one set in Frappe.

Other than that, actually, no info are shown in traceback to identify it.

ok no easy way to tell from the stack trace alone :frowning:

thanks for that