Up until version 9, the import function would process the CSV file you feed it and report a list of the the line numbers with errors.
Now it seems it has been modified to only report a single error message:
IMPORT FAILED
Please correct the format of the file and import again.
Problem #1:
First, the data entry screens in ERPNext are not consistent with the “Required” fields in the import function. For example, it is possible to save a “Suppliers” record in the regular user interface without filling in the “Default Payable Account” but if you leave that field blank in the import function it will error without any details.
You can prove this for yourself buy using the Supplier user interface screen to enter a dummy supplier record without the Default Payable Account field. Then export the Supplier template with data and you will see the dummy record comes through without the field populated. If you then delete all other records but the line with the dummy record, delete the information in column B, and then change the name and other information to be yet another dummy Supplier., make sure only the “Do not update but insert rows” box and the “Do not send emails” box are checked and all other boxes left unchecked, then try to import that file back and it errors. If a field is required in the import function, should it also be required in the user interface?
Problem #2:
In previous versions of the import function, required linked fields in one file must already exist in the system for them to import without errors. For example, if you import “Item.csv” then every item must also have a valid default warehouse that is already part of the system BEFORE you attempt to execute the import. In previous versions, if the default warehouse column contained a value that was not already in the system, an error would be generated that listed the line number of the offending record. In the current version, if you list a default warehouse that does NOT already exist in the Warehouse data of ERPNext, the whole file will import EXCEPT the offending record and no error is generated to indicate the record was skipped. Remember, the “Ignore encoding errors” and the “Skip rows with errors” boxes are NOT checked! This should not happen.
Yes, I know that line 17 of the file indicates that default_warehouse is not a required field. Yet, it still causes errors if populated with bad data, but those errors are not listed to the user running the import. This means that records are LOST during the import and no notification is presented to the user.
I discovered this by accident when looking for an important Item record after the import. When I went back to the original CSV file The only thing I could find wrong was the default_warehouse was misspelled. I recreated the file with only the line that I had corrected and it imported fine after the spelling fix. However, when it was part of the larger import session, I was not notified of the problem and all other records were imported just fine.
Apparent Conclusion:
The single error message with no details of the errors, is a step backwards in this new version. The error trapping and reporting part of the import function has been changed and is no longer working properly. It allows errors to pass even if the check boxes for skipping error rows are unchecked.
BKM