The format of the source cannot be detected - CSVImport

Hello everyone,
I have new installation of Omkea-s up and running. Everything is working perfectly but I have a problem with the CSVImport module ( 2.2.1) . Whenever I try to import a CSV file of more than one row, I get the following error: The format of the source cannot be detected. When I edit the CSV file so it contains only one row, everything is working fine. I have also managed to import my original CSV file (with multiple rows) to the sandbox environment in http://dev.omeka.org/omeka-s-sandbox/login, so my problem is probably local.
I have re-installed the module, and also tried previous versions, but the result is always the same. Do you have any ideas?
Thanks,
Oded

*** update ***
done some more debugging, it seems unrelated to the number of rows but to the size of the CSV file. If it exceeds 75 bytes it will return the error: the format of the source cannot be detected. Also, when saving the larger files as TSV everything works.

1 Like

Dear Oded,
I do not have a solution but just to say that I encountered the same issue. I also moved on to using TSVs. Thanks for posting this and I hope there will be a solution.

Sanjin

Can either of you run file -bi yourcsvfile.csv on your server (where yourcsvfile.csv is a CSV that doesn’t work, obviously) and post what’s returned?

There’s a known issue with some servers returning the wrong type there. We have a fix written to work around that problem, but it’s not released yet. We can look at expediting that release if what you’re seeing is this same problem.

I am also encountering the same problem. And here is the filetype that you asked for:

>file -bi data.csv 
application/csv; charset=us-ascii

By the way, I’m using Omeka S version 3.1.1 and CSV Import version 2.2.1.

Hello, I have imported a massive (32000+ records) CSV several times over the past couple of weeks into my Omeka and I haven’t had any issue at all. My file is in my local file system though, I don’t know if this makes any difference.

file -bi output.csv 
regular file

I see. Here is the output from the server:

file -bi ‘ETCmsqjc6YlOjCSPGgneurQBY9Oma4fadypduxPtMl0kww?e=8pum3F’
text/html; charset=us-ascii

The file is encoded in UTF-8, and for some reason my server doesn’t recognize it as such.

Cheers,
Oded

Thanks for your responses.

The “application/csv” one is the issue that we have fixed and will have a release out for soon.

The new version 2.3.0 of the CSV Import module is out and includes the fix for the problem with
servers that detect CSV files as “application/csv”.

How can one update via the EasyInstall module? I have CSVImport 2.x and if I go to EasyInstall and select CSVImport 3 it tells me that it’s already downloaded. Even if I uninstall the current CSV import installed, it tells me that it’s already downloaded (which is only partially true, the version is different).

I’m not familiar with the Easy Install module so I can’t provide specific guidance there.

Though just to clarify, the new version of CSV Import is still a “2.x” version.

Yes, sorry, just a typo.

Thx, works like a charm.
Oded

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.