India Compliance App: GSTIN Configuration Issue

Versions:

  • ERPNext v15.53.2 / Frappe v15.56.1
  • India Compliance v15.16.1

GSTIN Validation Issue

  • Company GSTIN is showing as invalid
  • Unable to configure GSTIN correctly
  • In GSTIN List, No value is created upon Installation
  • No GST-related tax categories are automatically created

Are these things automatically created during Installation?

Error when refresh button is clicked.

Traceback

Traceback (most recent call last):
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 323, in _make_request
    raise e
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 283, in _make_request
    headers={"user_name": request_args["headers"]["user_name"],"password": request_args["headers"]["password"], "gstin": request_args["headers"]["gstin"], "requestid": request_args["headers"]["requestid"], "Authorization": _("{0} {1}").format(tokenType, accessToken)},
KeyError: 'user_name'

During handling of the above exception, another exception occurred:

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/india_compliance/india_compliance/gst_india/doctype/gstin/gstin.py", line 146, in get_gstin_status
    return create_or_update_gstin_status(gstin, throw=force_update)
  File "apps/india_compliance/india_compliance/gst_india/doctype/gstin/gstin.py", line 72, in create_or_update_gstin_status
    response = fetch_gstin_status(gstin=gstin, throw=throw)
  File "apps/india_compliance/india_compliance/gst_india/utils/gstin_info.py", line 220, in fetch_gstin_status
    raise e
  File "apps/india_compliance/india_compliance/gst_india/utils/gstin_info.py", line 204, in fetch_gstin_status
    response = PublicAPI().get_gstin_info(gstin)
  File "apps/india_compliance/india_compliance/gst_india/api_classes/public.py", line 22, in get_gstin_info
    response = self.get("search", params={"action": "TP", "gstin": gstin})
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 109, in get
    return self._make_request("GET", *args, **kwargs)
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 326, in _make_request
    log.output = response_json.copy()
AttributeError: 'NoneType' object has no attribute 'copy'

Request Data

{
	"type": "POST",
	"args": {
		"gstin": "32AADCS3676A1ZQ",
		"docstatus": null,
		"force_update": true
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/india_compliance.gst_india.doctype.gstin.gstin.get_gstin_status",
	"request_id": null
}

Response Data

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

Also we have integrated ERPNext with Adequare GSP’s e-invoicing services.

Could you share the response from the Integration Request received from the government portal? This will help us further investigate the issue.

Looks like this issue is because of your customisations / usage of modified India Compliance App.

We recently set up a new ERP site and migrated data from our old ERP site using the Data Import tool. Although the modified India Compliance App worked fine on the old site, but on the new site, it’s is not validating the Company GSTIN, even though we have confirmed that the GST Settings are correct.

Additionally, please note that the E-invoice data was migrated from the old database to the new one using SQL query. Facing error when running bench migrate. Could this be the issue?

Any insights or suggestions would be greatly appreciated.

Thanks.