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.

Executing frappe.patches.v13_0.generate_theme_files_in_public_folder in (_93c18b366cbc1d25)
Traceback (most recent call last):
  File "/usr/lib/python3.6/", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/", line 85, in _run_code
    exec(code, run_globals)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/utils/", line 99, in <module>
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/utils/", line 18, in main
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/", line 717, in main
    rv = self.invoke(ctx)
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/", 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/", 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/", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/benjamien/frappe-bench/env/lib/python3.6/site-packages/click/", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/commands/", line 26, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/commands/", line 287, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/", line 67, in migrate
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/modules/", line 41, in run_all
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/modules/", line 30, in run_patch
    if not run_single(patchmodule = patch):
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/modules/", line 71, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/modules/", line 91, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/patches/v13_0/", line 15, in execute
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/model/", line 281, in save
    return self._save(*args, **kwargs)
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/model/", line 315, in _save
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/model/", line 796, in _validate_links
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/", 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/", line 380, in msgprint
  File "/home/benjamien/frappe-bench/apps/frappe/frappe/", 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.