frappe.exceptions.DoesNotExistError: DocType Desk Chart not found

I have changing from erpnext 12 to 14 and run bench migrate then
Bench update and i get this error.

frappe.exceptions.DoesNotExistError: DocType Desk Chart not found

File “/opt/bench/frappe-bench/apps/frappe/frappe/init.py”, line 493, in msgprint
_raise_exception()
title = None
as_table = False
as_list = False
indicator = ‘red’
alert = False
primary_action = None
is_minimizable = False
wide = False
sys = <module ‘sys’ (built-in)>
out = {‘message’: ‘DocType Desk Chart not found’, ‘title’: ‘Message’, ‘indicator’: ‘red’, ‘raise_exception’: 1}
_raise_exception = <function msgprint.._raise_exception at 0x7fbfb32fec20>
_strip_html_tags = <functools._lru_cache_wrapper object at 0x7fbfb33cfab0>
msg = ‘DocType Desk Chart not found’
raise_exception = <class ‘frappe.exceptions.DoesNotExistError’>
strip_html_tags = <function strip_html_tags at 0x7fbfb8a95b40>
…skipped… 1 vars
File “/opt/bench/frappe-bench/apps/frappe/frappe/init.py”, line 442, in _raise_exception
raise raise_exception(msg)
msg = ‘DocType Desk Chart not found’
raise_exception = <class ‘frappe.exceptions.DoesNotExistError’>
…skipped… 1 vars
frappe.exceptions.DoesNotExistError: DocType Desk Chart not found
[bench@control frappe]$ msg = ‘DocType Desk Chart not found’

How can i work around this , please

I created a Desk Chart on Doc Type - Core and after i did that im getting another issue below
File “/opt/bench/frappe-bench/env/lib/python3.10/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
self = <pymysql.protocol.MysqlPacket object at 0x7f74472a2a40>
errno = 1062
File “/opt/bench/frappe-bench/env/lib/python3.10/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
data = b"\xff&\x04#23000Duplicate entry ‘Workspace Chart’ for key ‘PRIMARY’"
errno = 1062
errval = “Duplicate entry ‘Workspace Chart’ for key ‘PRIMARY’”
errorclass = <class ‘pymysql.err.IntegrityError’>
pymysql.err.IntegrityError: (1062, “Duplicate entry ‘Workspace Chart’ for key ‘PRIMARY’”)

Going from v12 → v14 is difficult and dangerous. You are better off going

  • v12
    • python3.8+ upgrade
  • switch to branch v13
    • +bench update --reset (this will sync the schemas)
    • python3.10+ upgrade
  • switch to branchv14
    • +bench update --reset (this will sync the schemas again)
1 Like

If i already updated from v12 to v14, how can i fixed above issue? or do i need to start again from v12 → v13 → v14? and how to do it without losing data as there were some input on v14?