Data Import problem

File {u’file_name’: u’/private/files/ItemImport-XXc28255.xlsx’} not foundThe resource you are looking for is not available

This happens when doing an ‘Item’ data import.

While doing a data import, after attaching a file, ERPNext pops up the error as above. Even after changing uploaded file name to something like TestFile.xlsx and reloading, same error happens with same file name. Any ideas?

Check your file Attachments weather it is uploaded or not, also check file permissions in particular directory.

Attachments work fine in general; only the ones regarding data imports are broken. This stopped working recently after accidental move to developer v11, and I’m pretty sure it was working two days ago even on v11.

I am facing same issue here

I have versions:
ERPNext: v10.1.54 (master)
Frappe Framework: v10.1.49 (master)

I am not able to upload item import and also image uploads stopped to work (those worked still but after trying long time item import, even image uploads started to fail). It is just keeping the pop up “Uploading” for ever on the screen and never finishes. I made a test.jpg that is a small image that wouldn’t get issues due to the size, and I also made an item import csv that had only one item but not going anywhere.

How to debug this?

Safari js console says while trying to upload a simple test image to an item:
Failed to load resource: The operation couldn’t be completed. (WebKitBlobResource error 4.)

Started testing with Chrome and so far simple upload (one item) of item csv works, so does updating a singular image. Has Safari got somehow broken in some recent update then? It used to work.

Oh, I wish I would have realised to test another browser earlier. I was accusing Open Office how it saves files, erpnext permissions or configs, erp caches…

By the way, lot of time when updating mass of images, one image file name loads even 20 times and instead of loading 20 other images. Somehow it gets stuck and keeps repeating the same image name. After that if you try to upload again those other image files, they either still come with the repetitive name or they come with date and time stamp additional to their name (after which you can’t rename the images and they won’t link to the product image that would be uploaded via data import).

yup, noticed something similar. Uploading files became quite unstable when (I think) using back/forward buttons.

1 Like

I realised that the same file name comes in a repeated way in case I have prepared the same image for products A, B, C and D and thus I have made picture-a.jpg, picture-b.jpg, picture-c.jpg, and picture-d.jpg. So, somehow the system knows that I’m loading the same image and it puts it multiple times e.g. with the name picture-a.jpg, never using the other filenames. If I edit this picture slightly that it is not an exact copy of the other, erp will upload it with its own name.

If I have an excel from a distributor and a pack of images, I can’t go through which images are exact copies of each others but I just need to upload them and then upload the item data import file and they would connect. Now this creates a problem since the picture won’t exist.

Frappe smartly checks hash/checksum of file being uploaded. If it finds an existing file with matching checksum, the exisiting file is used/attached instead of creating a new one.

We learnt this after receiving some pleasant surprises :slightly_smiling_face:

1 Like

While smart, such deduplication should IMO be optional and disabled on existing installations by default. External systems may rely on the file actually existing and being possible to modify without impacting other files that merely had the same content at one point in time.

1 Like

Yes, I’m trying to load images (still the process going on here) and this duplication happens all the time and if the filename is productA123b.jpg and then the other files are productA123c.jpg and productA123d.jpg, I get three times uploaded productA123b.jpg and my csv linking to the other two products having the images productA123c.jpg and productA123d.jpg fail.

If I anyway try to upload again some files that failed, I may get them automatically named like this style: productA123c 2018-10-06 14:56:43.jpg (including spaces in the filenames!). So, I tried to rename some of these pictures but there is no way to do that either from the File Manager (the name is not editable). Again these picture names won’t correspond with the csv file and the items will stay without a product image.

By the way, referring to the above: Safari started working again for the image uploads after I made a software update for it (not sure if it is due to the update or deep cache emptying due to the update).

Importing as CSV worked well

pls Remove “Opening stock” col from Excel sheet it will work awsome.