Unable to view api/resource in version 13

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 68, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 77, in handle
doc = frappe.get_doc(doctype, name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 851, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 72, in get_doc
controller = get_controller(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 73, in get_controller
site_controllers[doctype] = _get_controller()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 65, in _get_controller
raise ImportError(doctype)
ImportError: item

Am i the only one have this proble?

I think yes :smiley:

I can see in your error dump you tried the wrong doctype name. If you want to fetch item details then you should write ‘url/api/resource/Item’.

Yes you are correct. This work for item but not invoice

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 205, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 934, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 941, in _find_and_load_unlocked
File “”, line 219, in _call_with_frames_removed
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘frappe.core.doctype.sales_invoice’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 68, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 77, in handle
doc = frappe.get_doc(doctype, name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 845, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 72, in get_doc
controller = get_controller(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 74, in get_controller
site_controllers[doctype] = _get_controller()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 56, in _get_controller
module = load_doctype_module(doctype, module_name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 207, in load_doctype_module
raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
ImportError: Module import failed for sales-invoice (frappe.core.doctype.sales_invoice.sales_invoice Error: No module named ‘frappe.core.doctype.sales_invoice’)