Error , In India Compliance app, AttributeError

Hello,

India compliance app has been installed.
getting the following error.

Any Suggestions?

Server Error

AttributeError: ‘list’ object has no attribute ‘get’
Possible source of error: india_compliance (app)

App Versions

{
	"business_theme_v14": "0.0.1",
	"devang": "0.0.1",
	"erpnext": "15.53.1",
	"first_theme": "0.0.1",
	"frappe": "15.56.1",
	"hrms": "15.40.0",
	"india_compliance": "16.0.0-dev"
}

Route

Form/Sales Invoice/new-sales-invoice-wgmmptjbyv

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 50, 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 1726, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 342, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 364, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 295, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1104, in run_before_save_methods
    self.run_method("before_save")
  File "apps/frappe/frappe/model/document.py", line 974, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1334, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1318, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/india_compliance/india_compliance/gst_india/overrides/transaction.py", line 1625, in update_gst_details
    ItemGSTDetails().update(doc)
  File "apps/india_compliance/india_compliance/gst_india/overrides/transaction.py", line 1182, in update
    self.set_item_wise_tax_details()
  File "apps/india_compliance/india_compliance/gst_india/overrides/transaction.py", line 1249, in set_item_wise_tax_details
    tax_rate = old[item_name].get("tax_rate")
AttributeError: 'list' object has no attribute 'get'

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"Sales Invoice\",\"name\":\"new-sales-invoice-lbhsrnkgoe\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"naming_series\":\"SINV-.YY.-\",\"e_waybill_status\":\"\",\"company\":\"A K Gandhi Electronics\",\"posting_date\":\"2025-04-04\",\"set_posting_time\":0,\"is_pos\":0,\"is_consolidated\":0,\"is_return\":0,\"update_outstanding_for_self\":1,\"update_billed_amount_in_sales_order\":0,\"update_billed_amount_in_delivery_note\":1,\"is_debit_note\":0,\"is_reverse_charge\":0,\"is_export_with_gst\":0,\"currency\":\"INR\",\"selling_price_list\":\"Standard Selling\",\"price_list_currency\":\"INR\",\"ignore_pricing_rule\":0,\"update_stock\":0,\"items\":[{\"docstatus\":0,\"doctype\":\"Sales Invoice Item\",\"name\":\"new-sales-invoice-item-grxtslqcgn\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"has_item_scanned\":0,\"stock_uom\":\"Nos\",\"margin_type\":\"\",\"is_free_item\":0,\"grant_commission\":1,\"delivered_by_supplier\":0,\"is_fixed_asset\":0,\"enable_deferred_revenue\":0,\"use_serial_batch_fields\":1,\"allow_zero_valuation_rate\":0,\"cost_center\":\"Main - AKGE\",\"page_break\":0,\"parent\":\"new-sales-invoice-lbhsrnkgoe\",\"parentfield\":\"items\",\"parenttype\":\"Sales Invoice\",\"idx\":1,\"__unedited\":false,\"gst_hsn_code\":\"61071100\",\"item_code\":\"SKU001\",\"weight_per_unit\":0,\"weight_uom\":null,\"conversion_factor\":1,\"barcode\":null,\"pricing_rules\":\"\",\"item_name\":\"T-shirt\",\"description\":\"T-shirt\",\"image\":\"https://images.pexels.com/photos/1484808/pexels-photo-1484808.jpeg\",\"warehouse\":null,\"income_account\":\"Sales - AKGE\",\"expense_account\":\"Cost of Goods Sold - AKGE\",\"discount_account\":null,\"provisional_expense_account\":null,\"has_serial_no\":0,\"has_batch_no\":0,\"batch_no\":null,\"uom\":\"Nos\",\"min_order_qty\":\"\",\"qty\":1,\"stock_qty\":1,\"price_list_rate\":800,\"base_price_list_rate\":800,\"rate\":800,\"base_rate\":800,\"amount\":800,\"base_amount\":800,\"net_rate\":800,\"net_amount\":800,\"discount_percentage\":0,\"discount_amount\":0,\"update_stock\":0,\"last_purchase_rate\":0,\"transaction_date\":\"2025-04-04\",\"against_blanket_order\":null,\"bom_no\":null,\"item_group\":\"Demo Item Group\",\"brand\":null,\"manufacturer\":null,\"manufacturer_part_no\":null,\"item_tax_rate\":\"{}\",\"customer_item_code\":null,\"has_margin\":false,\"free_item_data\":[],\"child_docname\":\"new-sales-invoice-item-grxtslqcgn\",\"rate_with_margin\":0,\"base_rate_with_margin\":0,\"margin_rate_or_amount\":0,\"stock_uom_rate\":800,\"base_net_rate\":800,\"base_net_amount\":800,\"taxable_value\":0,\"igst_rate\":0,\"cgst_rate\":0,\"sgst_rate\":0,\"cess_rate\":0,\"cess_non_advol_rate\":0,\"igst_amount\":0,\"cgst_amount\":0,\"sgst_amount\":0,\"cess_amount\":0,\"cess_non_advol_amount\":0,\"total_weight\":0,\"incoming_rate\":0,\"actual_batch_qty\":0,\"actual_qty\":0,\"company_total_stock\":0,\"delivered_qty\":0}],\"taxes\":[{\"docstatus\":0,\"doctype\":\"Sales Taxes and Charges\",\"name\":\"new-sales-taxes-and-charges-gsnvrtmerx\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"charge_type\":\"On Net Total\",\"included_in_print_rate\":0,\"included_in_paid_amount\":0,\"cost_center\":\"Main - AKGE\",\"account_currency\":null,\"dont_recompute_tax\":0,\"parent\":\"new-sales-invoice-lbhsrnkgoe\",\"parentfield\":\"taxes\",\"parenttype\":\"Sales Invoice\",\"idx\":1,\"row_id\":null,\"account_head\":\"Output Tax SGST - AKGE\",\"description\":\"SGST\",\"rate\":9,\"gst_tax_type\":null,\"tax_amount\":72,\"total\":872,\"tax_amount_after_discount_amount\":72,\"base_tax_amount\":72,\"base_total\":872,\"base_tax_amount_after_discount_amount\":72,\"item_wise_tax_detail\":\"{\\\"SKU001\\\":[9,72]}\"},{\"docstatus\":0,\"doctype\":\"Sales Taxes and Charges\",\"name\":\"new-sales-taxes-and-charges-jraxfhipwx\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"charge_type\":\"On Net Total\",\"included_in_print_rate\":0,\"included_in_paid_amount\":0,\"cost_center\":\"Main - AKGE\",\"account_currency\":null,\"dont_recompute_tax\":0,\"parent\":\"new-sales-invoice-lbhsrnkgoe\",\"parentfield\":\"taxes\",\"parenttype\":\"Sales Invoice\",\"idx\":2,\"row_id\":null,\"account_head\":\"Output Tax CGST - AKGE\",\"description\":\"CGST\",\"rate\":9,\"gst_tax_type\":null,\"tax_amount\":72,\"total\":944,\"tax_amount_after_discount_amount\":72,\"base_tax_amount\":72,\"base_total\":944,\"base_tax_amount_after_discount_amount\":72,\"item_wise_tax_detail\":\"{\\\"SKU001\\\":[9,72]}\"}],\"use_company_roundoff_cost_center\":0,\"disable_rounded_total\":0,\"apply_discount_on\":\"Grand Total\",\"is_cash_or_non_trade_discount\":0,\"pricing_rules\":[],\"packed_items\":[],\"timesheets\":[],\"total_billing_amount\":0,\"payments\":[],\"allocate_advances_automatically\":0,\"only_include_allocated_payments\":0,\"advances\":[],\"write_off_outstanding_amount_automatically\":0,\"redeem_loyalty_points\":0,\"ignore_default_payment_terms_template\":0,\"payment_schedule\":[],\"party_account_currency\":\"INR\",\"is_opening\":\"No\",\"sales_team\":[],\"letter_head\":\"Information\",\"group_same_items\":0,\"invoice_copy\":\"Original for Recipient\",\"mode_of_transport\":\"Road\",\"lr_date\":\"2025-04-04\",\"gst_vehicle_type\":\"Regular\",\"status\":\"Draft\",\"einvoice_status\":\"\",\"is_internal_customer\":0,\"is_discounted\":0,\"conversion_rate\":1,\"plc_conversion_rate\":1,\"total_billing_hours\":0,\"company_tax_id\":null,\"company_address\":\"A K Gandhi Electronics-Billing\",\"company_address_display\":\"dhantoli<br>\\nNagpur<br>\\nMaharashtra<br>440012<br>India<br>\\n<br>\\n\",\"base_net_total\":800,\"net_total\":800,\"base_total\":800,\"total\":800,\"total_qty\":1,\"rounding_adjustment\":0,\"grand_total\":944,\"base_grand_total\":944,\"total_taxes_and_charges\":144,\"base_total_taxes_and_charges\":144,\"base_rounding_adjustment\":0,\"rounded_total\":944,\"base_rounded_total\":944,\"in_words\":\"\",\"base_in_words\":\"\",\"base_discount_amount\":0,\"total_advance\":0,\"write_off_amount\":0,\"paid_amount\":0,\"base_paid_amount\":0,\"change_amount\":0,\"base_change_amount\":0,\"outstanding_amount\":944,\"amount_eligible_for_commission\":800,\"total_commission\":null,\"company_gstin\":\"27BDBPM1922L1ZJ\",\"posting_time\":\"19:42:05\",\"total_net_weight\":0,\"tax_id\":null,\"customer_name\":\"Grant Plastics Ltd.\",\"loyalty_program\":null,\"represents_company\":null,\"customer\":\"Grant Plastics Ltd.\",\"debit_to\":\"Debtors - AKGE\",\"due_date\":\"2025-04-04\",\"customer_address\":\"Grant Plastics Ltd.-Billing\",\"billing_address_gstin\":null,\"gst_category\":\"Unregistered\",\"address_display\":\"shivaji nagar<br>\\nnagpur<br>\\nMaharashtra<br>440010<br>India<br>\\n<br>\\n\",\"shipping_address_name\":\"Grant Plastics Ltd.-Billing\",\"shipping_address\":\"shivaji nagar<br>\\nnagpur<br>\\nMaharashtra<br>440010<br>India<br>\\n<br>\\n\",\"tax_category\":\"\",\"place_of_supply\":\"27-Maharashtra\",\"taxes_and_charges\":\"Output GST In-state - AKGE\",\"contact_person\":null,\"contact_display\":null,\"contact_email\":null,\"contact_mobile\":null,\"customer_group\":\"Demo Customer Group\",\"territory\":null,\"language\":\"en\",\"payment_terms_template\":null}",
		"action": "Save"
	},
	"btn": {
		"jQuery370056262142069695091": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 31084,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs",
	"request_id": null
}

Response Data

{
	"exception": "AttributeError: 'list' object has no attribute 'get'",
	"exc_type": "AttributeError",
	"_exc_source": "india_compliance (app)"
}

You are using incompatible versions.

You are using version-15 of erpnext but develop branch of the India Complaince App.

Kindly change the branch of India Compliance App/

1 Like

Thank you Lakshit!