Import error with CSV Import

I’ve been trying to import a CSV file into my db on reclaimhosting, but it just keeps saying “Import error” with zero files uploaded on the CSV import status screen. I’ve done this about a hundred times and it’s always worked. So I have two questions: where do I find my error messages? and What could be wrong with this import?

One likely possibility here is that you have not set your PHP-CLI path, which allows background processes to run. See documentation here: Setting the PHP path - Omeka Classic User Manual

And the instructions for making the error messages visible are here: Retrieving Error Messages - Omeka Classic User Manual

Thanks, I’ve set the error log to true. I’ll see what happens.

The PHP path is a little mysterious. It says that I’m running PHP 7.3 and need to update (I just installed this a month ago and have used CSV import several times successfully, so don’t know why it’s out of date), but then next to my domains, it says that I’m running PHP 8.0, so I don’t know whether to set it to background.php.path = “/usr/local/bin/ea-php73” or 80.

Reclaim pushed everyone up to PHP 8.0 when they deprecated the earlier versions. In that case, you’ll want the 80 version of the path.

I tried that first. It didn’t work. Tried to update by choosing 8.0 from the dropdown, but it doesn’t allow it to by applied.

Got my error log to work!

2023-06-22T17:34:03+00:00 ERR (3): [CsvImport][#14] Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Incorrect string value: ‘\x961914)…’ for column ‘text’ at row 1 in /home/martindi/public_html/application/libraries/Zend/Db/Statement/Mysqli.php:215
Stack trace:
#0 /home/martindi/public_html/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/martindi/public_html/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 /home/martindi/public_html/application/libraries/Omeka/Db.php(80): Zend_Db_Adapter_Abstract->query(‘INSERT INTO om...', Array) #3 /home/martindi/public_html/application/libraries/Omeka/Db.php(257): Omeka_Db->__call('query', Array) #4 /home/martindi/public_html/application/libraries/Omeka/Record/AbstractRecord.php(542): Omeka_Db->insert('om_element_text...', Array) #5 /home/martindi/public_html/application/models/Mixin/ElementText.php(670): Omeka_Record_AbstractRecord->save() #6 /home/martindi/public_html/application/models/Mixin/ElementText.php(93): Mixin_ElementText->saveElementTexts() #7 /home/martindi/public_html/application/libraries/Omeka/Record/AbstractRecord.php(255): Mixin_ElementText->afterSave(Array) #8 /home/martindi/public_html/application/libraries/Omeka/Record/AbstractRecord.php(284): Omeka_Record_AbstractRecord->delegateToMixins('afterSave', Array, true) #9 /home/martindi/public_html/application/libraries/Omeka/Record/AbstractRecord.php(549): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array) #10 /home/martindi/public_html/application/libraries/Omeka/Record/Builder/AbstractBuilder.php(67): Omeka_Record_AbstractRecord->save() #11 /home/martindi/public_html/application/libraries/globals.php(539): Omeka_Record_Builder_AbstractBuilder->build() #12 /home/martindi/public_html/plugins/CsvImport/models/CsvImport/Import.php(727): insert_item(Array, Array) #13 /home/martindi/public_html/plugins/CsvImport/models/CsvImport/Import.php(593): CsvImport_Import->_addItemFromRow(Array) #14 /home/martindi/public_html/plugins/CsvImport/models/CsvImport/Import.php(336): CsvImport_Import->_importLoop(0) #15 /home/martindi/public_html/plugins/CsvImport/models/CsvImport/ImportTask.php(39): CsvImport_Import->start() #16 /home/martindi/public_html/application/libraries/Omeka/Job/Process/Wrapper.php(29): CsvImport_ImportTask->perform() #17 /home/martindi/public_html/application/scripts/background.php(61): Omeka_Job_Process_Wrapper->run(Array) #18 {main} 2023-06-22T17:34:03+00:00 ERR (3): Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Incorrect string value: '\x961914)...' for column 'text' at row 1 in /home/martindi/public_html/application/libraries/Zend/Db/Statement/Mysqli.php:215 Stack trace: #0 /home/martindi/public_html/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array) #1 /home/martindi/public_html/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #2 /home/martindi/public_html/application/libraries/Omeka/Db.php(80): Zend_Db_Adapter_Abstract->query('INSERT INTO om…’, Array)
#3 /home/martindi/public_html/application/libraries/Omeka/Db.php(257): Omeka_Db->__call(‘query’, Array)
#4 /home/martindi/public_html/application/libraries/Omeka/Record/AbstractRecord.php(542): Omeka_Db->insert(‘om_element_text…’, Array)
#5 /home/martindi/public_html/application/models/Mixin/ElementText.php(670): Omeka_Record_AbstractRecord->save()
#6 /home/martindi/public_html/application/models/Mixin/ElementText.php(93): Mixin_ElementText->saveElementTexts()
#7 /home/martindi/public_html/application/libraries/Omeka/Record/AbstractRecord.php(255): Mixin_ElementText->afterSave(Array)
#8 /home/martindi/public_html/application/libraries/Omeka/Record/AbstractRecord.php(284): Omeka_Record_AbstractRecord->delegateToMixins(‘afterSave’, Array, true)
#9 /home/martindi/public_html/application/libraries/Omeka/Record/AbstractRecord.php(549): Omeka_Record_AbstractRecord->runCallbacks(‘afterSave’, Array)
#10 /home/martindi/public_html/application/libraries/Omeka/Record/Builder/AbstractBuilder.php(67): Omeka_Record_AbstractRecord->save()
#11 /home/martindi/public_html/application/libraries/globals.php(539): Omeka_Record_Builder_AbstractBuilder->build()
#12 /home/martindi/public_html/plugins/CsvImport/models/CsvImport/Import.php(727): insert_item(Array, Array)
#13 /home/martindi/public_html/plugins/CsvImport/models/CsvImport/Import.php(593): CsvImport_Import->_addItemFromRow(Array)
#14 /home/martindi/public_html/plugins/CsvImport/models/CsvImport/Import.php(336): CsvImport_Import->_importLoop(0)
#15 /home/martindi/public_html/plugins/CsvImport/models/CsvImport/ImportTask.php(39): CsvImport_Import->start()
#16 /home/martindi/public_html/application/libraries/Omeka/Job/Process/Wrapper.php(29): CsvImport_ImportTask->perform()
#17 /home/martindi/public_html/application/scripts/background.php(61): Omeka_Job_Process_Wrapper->run(Array)
#18 {main}

Ok, I fixed it. I searched on the first line of the error message and found an old message that expressed that I need to use CSV-UTF 8 instead of raw CSV, which is what I’ve always used.

I still have problems with getting the PHP updated, and for some reason, the time zone thinks I’m on the Ivory Coast, but it worked!

Except that the images are now thumbnails. Out of the frying pan…