Bench migrate issue

Migrating site1.local
Updating frappe                     : [                                        ]Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, 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/vhrs/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/vhrs/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/vhrs/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/vhrs/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/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/vhrs/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/vhrs/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/commands/site.py", line 163, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/migrate.py", line 29, in migrate
    frappe.model.sync.sync_all(verbose=verbose)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/model/sync.py", line 19, in sync_all
    sync_for(app, force, verbose=verbose)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/model/sync.py", line 43, in sync_for
    import_file_by_path(doc_path, force=force)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 54, in import_file_by_path
    import_doc(doc, force=force, data_import=data_import, pre_process=pre_process)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 122, in import_doc
    doc.insert()
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/model/document.py", line 205, in insert
    self.db_insert()
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/model/base_document.py", line 283, in db_insert
    ), d.values())
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/database.py", line 136, in sql
    self._cursor.execute(query, values)
  File "/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1048, "Column 'beta' cannot be null")
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==2.1.0', 'console_scripts', 'bench')()
  File "/home/vhrs/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/vhrs/bench-repo/bench/commands/update.py", line 61, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/vhrs/bench-repo/bench/commands/update.py", line 91, in _update
    patch_sites(bench=bench_path)
  File "/home/vhrs/bench-repo/bench/utils.py", line 132, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/home/vhrs/bench-repo/bench/utils.py", line 491, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')
vhrs@vhrs-HP-Z210-Workstation:~/frappe-bench$ bench migrate
Migrating site1.local
Updating frappe                     : [                                        ]Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, 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/vhrs/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/vhrs/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/vhrs/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/vhrs/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/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/vhrs/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/vhrs/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/commands/site.py", line 163, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/migrate.py", line 29, in migrate
    frappe.model.sync.sync_all(verbose=verbose)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/model/sync.py", line 19, in sync_all
    sync_for(app, force, verbose=verbose)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/model/sync.py", line 43, in sync_for
    import_file_by_path(doc_path, force=force)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 54, in import_file_by_path
    import_doc(doc, force=force, data_import=data_import, pre_process=pre_process)
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 122, in import_doc
    doc.insert()
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/model/document.py", line 205, in insert
    self.db_insert()
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/model/base_document.py", line 283, in db_insert
    ), d.values())
  File "/home/vhrs/frappe-bench/apps/frappe/frappe/database.py", line 136, in sql
    self._cursor.execute(query, values)
  File "/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1048, "Column 'beta' cannot be null")

TRY THIS:

bench update

bench use site1.local

bench migrate

What branch for frappe and erpnext are you using?

develop

you are using beta version, not only develop, which is a non production version…

if you are aware of this and want to use it, then please try what i have given you or wait for @vjFaLk to check there might be a bug in the configurations…

Hello Please what is the solution to this, I have the same issue.
I am running v6.27.19

Executing erpnext.patches.v6_20x.remove_customer_supplier_roles in site2.local (82e08c4a14)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, 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 79, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, 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 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/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/frappe/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/frappe/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/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, 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 163, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 27, in migrate
frappe.modules.patch_handler.run_all()
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v6_20x/remove_customer_supplier_roles.py”, line 15, in execute
d.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 247, in save
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 640, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 601, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 765, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 748, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 595, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 52, in validate
validate_fields(self)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 439, in validate_fields
check_link_table_options(d)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 287, in check_link_table_options
frappe.throw(
(“Options must be a valid DocType for field {0} in row {1}”).format(d.label, d.idx))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 284, in throw
msgprint(msg, raise_exception=exc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 277, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 262, in _raise_exception
raise raise_exception, encode(msg)
frappe.exceptions.ValidationError: Options must be a valid DocType for field Payments in row 80
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 61, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 91, in _update
patch_sites(bench=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 132, in patch_sites
run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench=bench)
File “/home/frappe/bench-repo/bench/utils.py”, line 491, in run_frappe_cmd
raise CommandFailedError(args)
bench.utils.CommandFailedError: (’–site’, ‘all’, ‘migrate’)