I have had problems when importing, I get that error, I attach the file I used at the time of import Does anyone know how to solve the problem? My version of magento is 2.1.6 Error

https://drive.google.com/file/d/1fe9nv4EvZ2sgYYCMYWA5QtcwRfFiX61t/view?usp=sharing This is the link where the file is


1 Answer 1


We can able to overcome the issue by creating a new source (Stores -> Inventory -> Sources) with code 'default'.

While debugging, It tries to insert the data into inventory_source_item table with source_code = 'default'. And since that source_code is a foreign key to the inventory_source table, it showed the error. When creating the source with code 'default', it then fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.