LinkvalidationError when bench update

When i do bench update, I get an error.

frappe.exceptions.LinkValidationError: Could not find Text Color: #000000, Background Color: FFFFFF

I have even tried removing me entire erpnext/frappe installation en restoring everything back, but it remains the same.

    Migrating erp.betoware.be
Executing frappe.patches.v13_0.generate_theme_files_in_public_folder in erp.betoware.be (_93c18b366cbc1d25)
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 99, in <module>
    main()
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 26, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/commands/site.py", line 287, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/migrate.py", line 67, in migrate
    frappe.modules.patch_handler.run_all(skip_failing)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 41, in run_all
    run_patch(patch)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 30, in run_patch
    if not run_single(patchmodule = patch):
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 71, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 91, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/patches/v13_0/generate_theme_files_in_public_folder.py", line 15, in execute
    doc.save()
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/model/document.py", line 281, in save
    return self._save(*args, **kwargs)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/model/document.py", line 315, in _save
    self._validate_links()
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/model/document.py", line 796, in _validate_links
    frappe.LinkValidationError)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/__init__.py", line 401, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/__init__.py", line 380, in msgprint
    _raise_exception()
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/__init__.py", line 328, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.LinkValidationError: Could not find Text Color: #000000, Background Color: FFFFFF

It may help to say the operating environment, the version of ERPNext and if this is happening on a new installation or one that had been upgrading ok .

Has bench update --reset been tried?

My environment :

  • Ubuntu 18.04.5 LTS
  • Removed erpnext, installed with the install script, and restored the database
  • It worked before I restored the database
  • bench update --reset gives me the same error

Why are you restoring the backup?

I had this problem and couldn’t get it fixed.
So in an attempt to resolve this, I removed my erpnext installation and installed everything from cratch.
Then I restore my data, and the problem came back.

To fix this I updated the values in ‘tabWebsite Theme’ and set the values for ‘background_color’ and ‘text_color’ to null.
This got me past the bench update without error.

1 Like

I have the same error, and I tried your method. However, it didn’t solve my problem.

Ok so here is how I resolved my own problem which is similar to the subject matter.

  • Drop the column field text colour(or any other column you may wish to drop)

  • Add the column back into the table, and set its default value null.

  • Run bench update --patch and the error should be resolved.