HI @snv,
I am trying to migrate to V14 from V13 that uses GST. I am able to do bench get the app with correct version 14 (India Compliance version india_compliance 14.26.5).
When I try to install the app on the site, I get the following error. Seems like the log migration is failing either due to query format or because of lots of existing data. How to resolve this?
bench --site migratedesk.local install-app india_compliance
App erpnext already installed
Installing india_compliance...
Updating DocTypes for india_compliance: [========================================] 100%
Setting up Income Tax...
Setting up GST...
Patching Existing Data...
Please check for addresses without GST Category and set approporiate values.
Installation for India Compliance failed due to an error. Please try re-installing the app or report the issue on https://github.com/resilient-tech/india-compliance/issues/new if not resolved.
An error occurred while installing india_compliance: (2006, "MySQL server has gone away (BrokenPipeError(32, 'Broken pipe'))")
Traceback (most recent call last):
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 760, in _write_bytes
self._sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 400, in install_app
_install_app(app, verbose=context.verbose, force=force)
File "apps/frappe/frappe/installer.py", line 305, in install_app
frappe.get_attr(after_install)()
File "apps/india_compliance/india_compliance/install.py", line 73, in after_install
raise e
File "apps/india_compliance/india_compliance/install.py", line 62, in after_install
run_post_install_patches()
File "apps/india_compliance/india_compliance/install.py", line 86, in run_post_install_patches
frappe.get_attr(f"india_compliance.patches.post_install.{patch}.execute")()
File "apps/india_compliance/india_compliance/patches/post_install/update_e_invoice_fields_and_logs.py", line 17, in execute
migrate_e_invoice_request_log()
File "apps/india_compliance/india_compliance/patches/post_install/update_e_invoice_fields_and_logs.py", line 204, in migrate_e_invoice_request_log
frappe.db.bulk_insert(
File "apps/frappe/frappe/database/database.py", line 1416, in bulk_insert
query.columns(fields).insert(*values_to_insert).run()
File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
File "apps/frappe/frappe/database/database.py", line 244, in sql
self._cursor.execute(query, values)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
result = self._query(query)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
conn.query(q)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 548, in query
self._execute_command(COMMAND.COM_QUERY, sql)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 829, in _execute_command
self.write_packet(sql[:packet_size])
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 684, in write_packet
self._write_bytes(data)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 763, in _write_bytes
raise err.OperationalError(
pymysql.err.OperationalError: (2006, "MySQL server has gone away (BrokenPipeError(32, 'Broken pipe'))")