Strange Error Message On Import Products Attempt

I am trying to add some products via a CSV file import and am getting an error I never saw before. I am using a comma delimited CSV. The error is below:



Error: It is not allowed to create/upload/rename files of the text/plain MIME type



The file contained around 22 fields. I tried just Product code, Language and the next field and the import worked. I added the fourth field and tried import and this worked. I kept adding fields until I got the error again. The field was Product name and it was the eighteenth field.



I backed up the database and backup seemed to hang at around 80%. Optimizing the database several times did not fix.



Any ideas appreciated.

Was there an unescaped comma in the field?

[quote name='tbirnseth' timestamp='1416988293' post='197979']

Was there an unescaped comma in the field?

[/quote]



Thanks for reply. That's probably it. There is a comma in the field values for some records. The export csv file is generated in Filemaker Pro as a Filemaker merge file (.mer) which is just a comma delimited csv with quoted field values. (After generating the file I change the extension to .csv) I thought this would be sufficient. Perhaps tab delimited csv would have been better. A line from the csv with a comma is below:



Product code,Language,Product name

“13716”,“en”,“Colonial Christmas, Holiday Doll”



How would I escape the comma, if this is necessary, in this case? I could always try a tab delimited csv. I thought the Filemaker merge file handled escapes automatically but was apparently mistaken.

I always prefer export as comma delimiter and open as tab seperator, looks much cleaner and easier to use.

Escape by preceding with backslash.

[quote name='johnbol1' timestamp='1417023840' post='198061']

I always prefer export as comma delimiter and open as tab seperator, looks much cleaner and easier to use.

[/quote]

Agree that tabs look neater and are far more legible. What editor do you use to open your cvs files in? I use Text Wrangler (Mac) and I don't see away to “open as”. Easy enough to replace “","” with “tab” but an “open as” option would be nice.




[quote name='tbirnseth' timestamp='1417026911' post='198070']

Escape by preceding with backslash.

[/quote]



Thanks!

I use Excel and am asked when opening what seperator to use, but other free spreadsheet programmes like open office calc do the same thing. Dont use a word editor, use a spreadsheet programme

[quote name='johnbol1' timestamp='1417107848' post='198190']

I use Excel and am asked when opening what seperator to use, but other free spreadsheet programmes like open office calc do the same thing. Dont use a word editor, use a spreadsheet programme

[/quote]



Thanks. Sounds like a good idea. I've been using Filemaker Pro, a relational DB, for its Applescript support but I think it's time to start playing with Excel (or a clone).

If you're saving as a csv, the editor you are using should escape any commas in the fields as part of the save.