why when I try to load a particular, very short CSV file (100 bytes) I get this error on application log ?
Execution error in service script [testscript] :: Input length = 3
with other files it's OK
Solved! Go to Solution.
I found that the problem was due to letter "à" (ascii exdended) on the csv text file, and that file was not saves with UTF-8 encoding but ANSI
Note that this happen with TWX 9.6 , in the past I was using TWX 8.5 and it was working fine
Now by saving the csv file with UTF-8 encoding, even with the "à" letter, it loads fine with LoadText
Problem solved
Take a look at this support article - Article - CS294337 - How to import text, CSV, or Excel data into ThingWorx. Hopefully that can resolve your issue.
Hi @iguerra ,
Hello @VladimirRosu
I'm, using loadText, not trying to import the csv data
// Content: STRING
Content = Things["MyRepository"].LoadText({
path: 'LDP.csv' /* STRING */
});
It seems the content of this particular file cause problem with that function. Function that is working since lot of time.
It is a text file with 2 rows of text, file is present and correct
with another text file works with no problems ... really strange !
(sorry unfortunatel I pressed the "accepted as solution" button, but I didn't solved)
I found that the problem was due to letter "à" (ascii exdended) on the csv text file, and that file was not saves with UTF-8 encoding but ANSI
Note that this happen with TWX 9.6 , in the past I was using TWX 8.5 and it was working fine
Now by saving the csv file with UTF-8 encoding, even with the "à" letter, it loads fine with LoadText
Problem solved