Object reference not set to an instance of an object. Bulk import products Version 4.2

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
hi all
version 4.2

im trying to update some products using bulk import excel-  but hitting the following error when i try to import

Object reference not set to an instance of an object.

the full error log:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Nop.Services.ExportImport.Help.PropertyByName`1.get_IsCaption() in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\Help\PropertyByName.cs:line 197
   at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)
   at Nop.Services.ExportImport.ImportManager.GetTypeOfExportedAttribute(ExcelWorksheet worksheet, PropertyManager`1 productAttributeManager, PropertyManager`1 specificationAttributeManager, Int32 iRow) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\ImportManager.cs:line 163
   at Nop.Services.ExportImport.ImportManager.PrepareImportProductData(ExcelWorksheet worksheet) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\ImportManager.cs:line 945
   at Nop.Services.ExportImport.ImportManager.ImportProductsFromXlsx(Stream stream) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\ImportManager.cs:line 1184
   at Nop.Web.Areas.Admin.Controllers.ProductController.ImportExcel(IFormFile importexcelfile) in E:\Others\Nop4.2 Clean With Search in Description\src\Presentation\Nop.Web\Areas\Admin\Controllers\ProductController.cs:line 2280


any idea??!  thanks
3 years ago
Export one product in an excel file and then import that excel file to make sure it is all working
Then you have the format that works - make sure your file is the same format
3 years ago
hi there
thanks for the reply. Yes i have tried this. still the same error.
I exported the products made some changes to meta keywords and description and i guess this is where the error lies.
do you know is there a character limit in these fields?
thanks !
3 years ago
Looking at the Import routine I can not see any length limits.
Looking at the database fields for Product you dont want to exceed that
TABLE [dbo].[Product]
  [Name] [nvarchar](400) NOT NULL,
  [MetaKeywords] [nvarchar](400) NULL,
  [MetaTitle] [nvarchar](400) NULL,
  [Sku] [nvarchar](400) NULL,
  [ManufacturerPartNumber] [nvarchar](400) NULL,
  [Gtin] [nvarchar](400) NULL,
  [RequiredProductIds] [nvarchar](1000) NULL,
  [AllowedQuantities] [nvarchar](1000) NULL,
3 years ago
ah i think i hav efound the issue.

i hav e afe produtcs in the list that have attributes. i.e. you can choose the colour. if i take these out it seems to import

i assume you cannot bulk import products that have options?

hope it helps somebody !
3 years ago
Export this Product "adidas Consortium Campus 80s Running Shoes" to see how you import Attributes
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.