Error when doing Import/Export

Hi,

The following error was encountered while trying to do an Export. Kindly advice how it could be rectified :
> Traceback (most recent call last):

  File "/home/frappe/benches/sunseap2-prod/apps/frappe/frappe/app.py", line 60, in application
    response = frappe.api.handle()
  File "/home/frappe/benches/sunseap2-prod/apps/frappe/frappe/api.py", line 49, in handle
    return frappe.handler.handle()
  File "/home/frappe/benches/sunseap2-prod/apps/frappe/frappe/handler.py", line 19, in handle
    execute_cmd(cmd)
  File "/home/frappe/benches/sunseap2-prod/apps/frappe/frappe/handler.py", line 36, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/frappe/benches/sunseap2-prod/apps/frappe/frappe/__init__.py", line 879, in call
    return fn(*args, **newargs)
  File "/home/frappe/benches/sunseap2-prod/apps/frappe/frappe/core/page/data_import_tool/exporter.py", line 261, in get_template
    build_field_columns(d)
  File "/home/frappe/benches/sunseap2-prod/apps/frappe/frappe/core/page/data_import_tool/exporter.py", line 105, in build_field_columns
    tablerow[column_start_end[dt].start + 1] = dt
IndexError: list assignment index out of range

Which is the version of Frappe you are using?


Have you checked this thread? "IndexError: list assignment index out of range" on downloading import template for Item, Employee and Purchase invoice

This issue was fixed in 7.0.23 version of Frappe. Can you please run bench update and try again.

Hi,

We are currently on ERPNext: v7.0.27.
Thank you.

Great. What about Frappe Framework version?

1 Like

Hi @strixaluco,

We are currently running Frappe Framework: v7.0.22
However, with the new changes in Salary Structure and Salary Slip, our clients are currently not ready for an update on ERPNext. While we progressive plan to transition them, kindly advice how we can rectify this error for the time being without impacting their ERPNext.

Refer to this commit in order to fix your instance: [Fix] Data import tool export issue (#1980) · frappe/frappe@c1fbf1d · GitHub
But please keep in mind that changing source code is not recommended practice.

1 Like

Hi @strixaluco,

Thank you for your prompt reply. We are not in favor to change the source code directly as well.
As such, could we check if there is a way to just update the Frappe Framework only without touching ERPNext?

Thank you.

Sorry, can’t tell for sure, but you can take a try on a test system.

@asneha1 New Salary Structure changes are coming in 7.1 - you can update your 7.0.x from master

@rmehta,

Looking forward to the changes. However, currently our customization triggers are not compatible with the current update (i.e. changes from Employee field to Employee table in Salary Structure). Hence the reason for not taking in the changes yet. Wondering if we could just take in the Frappe Framework update only such that Import/Export will work in the meantime.

Thank you.

Those changes are in 7.1-beta (develop branch). The master is still on 7.0 so you can update if you are on master branch.

This should not be required - just switch to master and then you will not have to upgrade