Issue with Data Import

I have two issues with data import. I’m trying to import customers, I download template, fill the template, but after clic in “Start Import” nothing happens, it stay “In progress” and in the error log I can there’s a a new error:

{‘retry’: 0, ‘log’: <function log at 0xb5d029cc>, ‘site’: u’erpnext.vm’, ‘event’: u’data_import’, ‘method_name’: u’upload’, ‘method’: <function upload at 0xb5ef848c>, ‘user’: u’info@ultranetxxi.net’, ‘kwargs’: {‘from_data_import’: u’Yes’, ‘validate_template’: False, ‘data_import_doc’: u’Import on 19-01-2018 03:09:52’}, ‘async’: True, ‘job_name’: u’<function upload at 0xb5d30cdc>’}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 95, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py”, line 464, in upload
data_import_doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 256, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 296, in _save
self.validate_update_after_submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 678, in validate_update_after_submit
self._validate_update_after_submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 575, in _validate_update_after_submit
frappe.UpdateAfterSubmitError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 323, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
UpdateAfterSubmitError: Not allowed to change Import Status after submission

Another error is that if my user has the language in spanish the templates download in spanish, then after filling the template It can be uploaded but again, can’t start the import because there’s an error in the log, this error looks like the system validates the template, and it searchs for the terms in english, but as my user has spanish as his account language the template downloads in spanish and the background validator detects this like an error.

{‘retry’: 0, ‘log’: <function log at 0xb5d019cc>, ‘site’: u’erpnext.vm’, ‘event’: u’data_import’, ‘method_name’: u’upload’, ‘method’: <function upload at 0xb5ef848c>, ‘user’: u’ventas102@granutmix.com.mx’, ‘kwargs’: {‘from_data_import’: u’Yes’, ‘validate_template’: False, ‘data_import_doc’: u’Import on 19-01-2018 03:07:53’}, ‘async’: True, ‘job_name’: u’<function upload at 0xb5d30cdc>’}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 95, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py”, line 278, in upload
start_row = get_start_row()
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py”, line 83, in get_start_row
bad_template()
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py”, line 72, in bad_template
frappe.throw(_(“Please do not change the rows above {0}”).format(get_data_keys_definition().data_separator))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 323, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
ValidationError: Please do not change the rows above Start entering data below this line

Any help is appreciated. Thanks!

It’s not an Issue. You have entered data incorrectly. Do not change any rows and start entering data from the mentioned line and try again.

Hi Sangram, I have been very carefully about entering the data after the mentioned line, I have repeated the operation at least 10 times to find what is causing this issue, as I said before it’s related with the language, only if the user language is english and the template is in english the error “ValidationError: Please do not change the rows above Start entering data below this line” doesn’t happen. But if that two conditions are ok (user language in english and template in english) the first reported issue happen, it only remain “in progress” and the error is captured in the log “UpdateAfterSubmitError: Not allowed to change Import Status after submission”

I dont have much experience with the new importer but as far as i can tell it will make crazy errors for small problems!

it seems lines 95, 278, 83, 72, 323, 309, 575, 678, 296, 256,464
have issues, try importing the file bit by bit first and see if the first ones will work.
Try importing lines 1-50 (or 21 to 70 i guess xD) or something and see that it works.

If it works, i recommend exporting a new data sheet having the “with data” box checked. That way you can compare lines that gives errors to those that succesfully imported.

Also formatting may cause issues, like date formatting in excel, so be sure to check those as well!
Make sure to use " . " instead of " , " with any number

may also try and first import only the “Mandatory” data and see if that works, and then add a new column bit by bit as updates (make sure to check “update only” and “dont add new entries” when doing this!

Hope this will help! Good luck!

Edit: you can also try making a dummy custommer in ERP next and fill in a bunch of data, and use that for your export “with data” could work!

Hi Daxer, I have the same problem with EPRNEXT 10… please, could you find the solution to this problem? … or at least how to eliminate the import work? Thanks in advance for your help.

Hi Fasarria, sorry for the delayed response, for my case it looks it was related to the language, only setting admin account to english and downloading the template in english works. I was getting mad with this because my system is in Spanish, but selecting english for admin account and importing with the template in english solves the problem.