You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relevant log output / Stack trace / Full Error Message.
` Traceback (most recent call last): File "apps/frappe/frappe/app.py", line 66, in application response = frappe.api.handle() File "apps/frappe/frappe/api.py", line 54, in handlereturnfrappe.handler.handle() File "apps/frappe/frappe/handler.py", line 45, in handle data = execute_cmd(cmd) File "apps/frappe/frappe/handler.py", line 83, in execute_cmdreturn frappe.call(method, **frappe.form_dict) File "apps/frappe/frappe/__init__.py", line 1607, in callreturn fn(*args, **newargs) File "apps/frappe/frappe/handler.py", line 304, in run_doc_method response = doc.run_method(method) File "apps/frappe/frappe/model/document.py", line 914, in run_method out = Document.hook(fn)(self, *args, **kwargs) File "apps/frappe/frappe/model/document.py", line 1264, in composerreturn composed(self, method, *args, **kwargs) File "apps/frappe/frappe/model/document.py", line 1246, in runner add_to_return_value(self, fn(self, *args, **kwargs)) File "apps/frappe/frappe/model/document.py", line 911, in fnreturn method_object(*args, **kwargs) File "apps/erpnext/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py", line 96, in get_accounts_data accounts_with_new_balance = self.calculate_new_account_balance( File "apps/erpnext/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py", line 230, in calculate_new_account_balance current_exchange_rate * d.balance_in_account_currencyTypeError: unsupported operand type(s) for*: 'NoneType' and 'float'``
The text was updated successfully, but these errors were encountered:
@aakvatech
Can't replicate this. calculate_exchange_rate_using_last_gle returns None only if the company and account are not provided, which from the screenshot, doesn't look like it. Can you try manually adding that account in the child table?
This is still happening. It's a matter of putting an or 0 so that it can be resolved.
For now, I've added the fix. But, the edge case that caused this typeerror is still not clear.
Information about bug
When click on 'Get Entries' we get this error.
When changed the code from:
` current_exchange_rate = calculate_exchange_rate_using_last_gle(
company, d.account, d.party_type, d.party
)
to
current_exchange_rate = calculate_exchange_rate_using_last_gle(
company, d.account, d.party_type, d.party
) or 0
`
The value of NoneType is avoided and the process continues
Module
accounts
Version
Frappe Framework: v14.30.0 (HEAD)
ERPNext: v14.20.0 (HEAD)
Frappe HR: v14.2.0 (HEAD)
Installation method
FrappeCloud
Relevant log output / Stack trace / Full Error Message.
The text was updated successfully, but these errors were encountered: