I have just upgraded to the latest version-16 release as below.
{
"frappe": "16.34.0",
"erpnext": "16.35.0",
"tornovert": "0.0.1",
"offsite_backups": "0.0.1"
}
Unfortunately I’m now getting the error below when I try to load the Sales Invoice List or specific Sales Invoice
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/modules/utils.py", line 304, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 837, in get_module
return importlib.import_module(modulename)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/lib/python3.14/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 759, in exec_module
File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 29, in <module>
from erpnext.accounts.doctype.tax_withholding_entry.tax_withholding_entry import SalesTaxWithholding
File "apps/erpnext/erpnext/accounts/doctype/tax_withholding_entry/tax_withholding_entry.py", line 345, in <module>
from erpnext.accounts.doctype.tax_withholding_category.tax_withholding_category import (
TaxWithholdingDetails,
)
File "apps/erpnext/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py", line 13, in <module>
from erpnext.controllers.accounts_controller import validate_account_head
File "apps/erpnext/erpnext/controllers/accounts_controller.py", line 64, in <module>
from erpnext.controllers.sales_and_purchase_return import validate_return
File "apps/erpnext/erpnext/controllers/sales_and_purchase_return.py", line 15, in <module>
from erpnext.stock.utils import _get_incoming_rate, get_combine_datetime, get_valuation_method, getdate
ImportError: cannot import name '_get_incoming_rate' from 'erpnext.stock.utils' (apps/erpnext/erpnext/stock/utils.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 158, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 63, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 41, in handle_rpc_call
return frappe.handler.handle()
~~~~~~~~~~~~~~~~~~~~~^^
File "apps/frappe/frappe/handler.py", line 53, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
return frappe.call(method, **frappe.form_dict)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 1147, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 36, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/desk/form/load.py", line 73, in getdoctype
docs = get_meta_bundle(doctype)
File "apps/frappe/frappe/desk/form/load.py", line 81, in get_meta_bundle
form_meta = frappe.desk.form.meta.get_meta(doctype)
File "apps/frappe/frappe/desk/form/meta.py", line 41, in get_meta
meta = FormMeta(doctype, cached=False)
File "apps/frappe/frappe/desk/form/meta.py", line 54, in __init__
self.load_assets()
~~~~~~~~~~~~~~~~^^
File "apps/frappe/frappe/desk/form/meta.py", line 65, in load_assets
self.load_templates()
~~~~~~~~~~~~~~~~~~~^^
File "apps/frappe/frappe/desk/form/meta.py", line 224, in load_templates
module = load_doctype_module(self.name)
File "apps/frappe/frappe/modules/utils.py", line 308, in load_doctype_module
raise ImportError(msg) from e
ImportError: Module import failed for Sales Invoice, the DocType you're trying to open might be deleted.
Error: cannot import name '_get_incoming_rate' from 'erpnext.stock.utils' (apps/erpnext/erpnext/stock/utils.py)
Request Data
{
"type": "GET",
"args": {
"doctype": "Sales Invoice",
"with_parent": 1
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.load.getdoctype",
"request_id": null
}
Response Data
{
"exception": "Error: cannot import name '_get_incoming_rate' from 'erpnext.stock.utils' (apps/erpnext/erpnext/stock/utils.py)",
"exc_type": "ImportError",
"_exc_source": "erpnext (app)"
}