I have ERPNext installation (ERPNext 12.19.0 / Frappe 12.16.3) with custom app, where I have stored some customizations exported as a fixtures. ERPNext is in Developer Mode.
I successfully switched to v13 with bench switch-to-branch version-13 frappe erpnext --upgrade
as described here
During bench update
I got this error, which looks to be related to Developer Mode.
TypeError: can't pickle module objects
I am not sure if it is a good practice, but solved it by changing frappe/frappe/init.py as mentioned here
After solving error above, I re-ran bench update
and there appeared another error related to Developer Mode:
frappe.core.doctype.doctype.doctype.CannotCreateStandardDoctypeError: Not in Developer Mode! Set in site_config.json or make 'Custom' DocType.
Developer Mode is set correctly in site_config.json, so why am I getting this error? Is it “supported” to update ERPNext V12 with custom app to V13? Does anybody successfuly updated V12 with custom app to V13?
Thank a lot for any help/ideas!
Full error log:
Executing erpnext.patches.v13_0.setup_gratuity_rule_for_india_and_uae in site1.local (_1bd3e0294da19198)
Success: Done in 0.009s
Executing erpnext.patches.v13_0.setup_uae_vat_fields in site1.local (_1bd3e0294da19198)
Success: Done in 0.009s
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/martin/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 101, in <module>
main()
File "/home/martin/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/martin/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/martin/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/martin/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/martin/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/martin/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/martin/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/martin/frappe-bench/env/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/martin/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 27, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/martin/frappe-bench/apps/frappe/frappe/commands/site.py", line 300, in migrate
skip_search_index=skip_search_index
File "/home/martin/frappe-bench/apps/frappe/frappe/migrate.py", line 73, in migrate
sync_fixtures()
File "/home/martin/frappe-bench/apps/frappe/frappe/utils/fixtures.py", line 24, in sync_fixtures
import_doc(frappe.get_app_path(app, "fixtures", fname))
File "/home/martin/frappe-bench/apps/frappe/frappe/core/doctype/data_import/data_import.py", line 190, in import_doc
reset_permissions=True
File "/home/martin/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 70, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File "/home/martin/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 143, in import_doc
doc.insert()
File "/home/martin/frappe-bench/apps/frappe/frappe/model/document.py", line 237, in insert
self.run_before_save_methods()
File "/home/martin/frappe-bench/apps/frappe/frappe/model/document.py", line 949, in run_before_save_methods
self.run_method("validate")
File "/home/martin/frappe-bench/apps/frappe/frappe/model/document.py", line 847, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/martin/frappe-bench/apps/frappe/frappe/model/document.py", line 1136, in composer
return composed(self, method, *args, **kwargs)
File "/home/martin/frappe-bench/apps/frappe/frappe/model/document.py", line 1119, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/martin/frappe-bench/apps/frappe/frappe/model/document.py", line 841, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/martin/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 62, in validate
self.check_developer_mode()
File "/home/martin/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 128, in check_developer_mode
frappe.throw(_("Not in Developer Mode! Set in site_config.json or make 'Custom' DocType."), CannotCreateStandardDoctypeError)
File "/home/martin/frappe-bench/apps/frappe/frappe/__init__.py", line 424, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File "/home/martin/frappe-bench/apps/frappe/frappe/__init__.py", line 403, in msgprint
_raise_exception()
File "/home/martin/frappe-bench/apps/frappe/frappe/__init__.py", line 357, in _raise_exception
raise raise_exception(msg)
frappe.core.doctype.doctype.doctype.CannotCreateStandardDoctypeError: Not in Developer Mode! Set in site_config.json or make 'Custom' DocType.