Sudently i have a problem

Hi Wappler team.

Suddenly I have this problem. I have had a working “import CSV file” importing data to a database. When trying to import a file this morning, I get an error. I used the functionality last week, and it worked as always. The only thing I have changed is updating the version of Wappler and a small test of changing the database to MSSQL, but I couldn’t connect, so I went back to MySQL. I have tested with the same file that worked last week; the file uploads correctly.

I get an message “Array to string conversion” and the trace: “#0 [internal function]: exception_error_handler(8, ‘Array to string…’, ‘/var/www/kaib.d…’, 105, Array)↵#1 /var/www/ PDOStatement->bindParam(4, ‘Array’, 2)↵#2 /var/www/ lib\db\Connection->execute(‘INSERT INTO `re…’, Array, false, ‘resultemp’)↵#3 /var/www/ modules\dbupdater->insert(Object(stdClass), ‘insert1’)↵#4 /var/www/ lib\App->execSteps(Object(stdClass))↵#5 /var/www/ lib\App->exec(Object(stdClass), true)↵#6 /var/www/ modules\core->condition(Object(stdClass), ‘’)↵#7 /var/www/ lib\App->execSteps(Object(stdClass))↵#8 /var/www/ lib\App->exec(Object(stdClass), true)↵#9 /var/www/ modules\core->repeat(Object(stdClass), ‘repeat1’)↵#10 /var/www/ lib\App->execSteps(Object(stdClass))↵#11 /var/www/ lib\App->execSteps(Array)↵#12 /var/www/ lib\App->exec(Object(stdClass))↵#13 /var/www/ lib\App->define(Object(stdClass))↵#14 {main}”

Best regards Kai

Just out of pure and utter interest is this CSV also a new one you have never imported before, maybe try importing a CSV file you have successfully imported before and see if it works as it should. If you have reverted your file importer to the old version then i would look at the CSV itself as the next possible cause.

Some CSV files contain something called a BOM (Byte Order Mark), and in certain instances I have noticed it can cause some strange behaviour, if you want to look through your CSV file manually for it, I have found the best way is using the built in edit command from the cPanel file manager as all the other text editing applications like to hide them.

Hi psweb
Thank you for taking the time to help me out.

I have tested with older files, and it is the same issue. I can’t see any BOM marks. I have tested with only one line in the file and I have changed the values to only 1, and it gives the same error. I think this issue is in Wappler. And it can be that something has happened after I test with MSSQL. Really strange problem.
@Teodor can you help?