Syntax Error: quote in unquoted cell" & "Cannot parse text argument to "list from csv table: as a CSV-formatted table"
I have two requests:
1. SHOW THE LINE NUMBER WHERE THE PARSE FAILED. This makes debugging a hell of a lot easier.
2. SKIP THE BAD LINE AND KEEP READING the database. Announce the bad line numbers at the end
of readDBFile. If you want, abort the readDBFile if the error count is greater than $SOME_NUMBER.
You could even make $SOME_NUMBER a parameter to readDBFile.
Thanks,
Bill Dudley
Trying to push the limits of App Inventor!
Snippets,
Tutorials and
Extensions from
Pura Vida Apps by
Taifun.
readDBFile isn't custom, it's part of the standard "library", in "Procedures".
Is there a recommended way to submit bug reports?
Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by
Taifun.
Trying to push the limits of App Inventor!
Snippets,
Tutorials and
Extensions from
Pura Vida Apps by
Taifun.
Syntax Error: quote in unquoted cell" & "Cannot parse text argument to "list from csv table: as a CSV-formatted table"
However, I don't understand where the original error message is coming from. I know I didn't code that message.
mgnoc_contact.csv is a semicolon delimited text file that my app has downloaded from a web site,
Syntax Error: quote in unquoted cell" & "Cannot parse text argument to "list from csv table: as a CSV-formatted table"However, I don't understand where the original error message is coming from. I know I didn't code that message.the error message is coming from the list from csv table blockthere is something in your file, which is not as expected
in the procedure, does it make sense to assign an empty list to the listpicker?
the list from csv table block uses commas as delimiter, you said, your file uses semicolons as delimiter...in your GotText event you can try to replace the list from csv table block by the split block, just split at \n (new line)...
Taifun
mgnoc_contact.csv is a semicolon delimited text file that my app has downloaded from a web site,btw. why don't you use the Web component and its GotText event to download the file into your app directly as text without need to first store it as file?
Taifun
Yes, why is "list from csv table" complaining about quotes in one of my fields?
I don't think this is what I'm doing:
I initialize the global variable listLocations to an empty list. Do I not have to initialize variables?
btw. why don't you use the Web component and its GotText event to download the file into your app directly as text without need to first store it as file?
I don't understand this, perhaps because I'm a unix programmer. Where would the data reside, if not in a file?
How does it achieve persistence? I don't want to have to download it every time the app runs.
Yes, why is "list from csv table" complaining about quotes in one of my fields?without being able to see your file, unfortunately I don't know,you might want to provide an example file...
btw. why don't you use the Web component and its GotText event to download the file into your app directly as text without need to first store it as file?
I don't understand this, perhaps because I'm a unix programmer. Where would the data reside, if not in a file?
How does it achieve persistence? I don't want to have to download it every time the app runs.usually you would download the file as text, convert it into a list and store it in TinyDB
What is the benefit of the additional conversion from text file to TinyDB?
re-tried again to use split on newline, and now it's working. I swear I have no ideawhy I was losing the first character of each line before.
these 3 rows look fine, you have to look for a quote and you will find the row, which results in that issuesee again your error message Syntax Error: quote in unquoted cell
What is the benefit of the additional conversion from text file to TinyDB?TinyDB is your data store, you said, you like to achieve persistence...see also the documentation http://ai2.appinventor.mit.edu/reference/components/storage.html#TinyDB
it probably helps to do some tutorials to learn the basics...
btw. your for each loop is not necessary, the split block already converts the file into a list, see also the documentationjust use these blocks insteadset global listLocations to split (get text, \n)
Taifun
But I'm not sure how I would us it in this instance, except to store the entire list of entries in there under a single key value.
I'm actually an experience (retired) developer. So I'm familiar with various databases (sql, Berkeley, perl hash, etc).
Interestingly, that gives me an empty list as a result. Or at least a list that the subsequent code displays as an empty ListPicker1.
But I'm not sure how I would us it in this instance, except to store the entire list of entries in there under a single key value.yes exactlythere is no need to store a file and nobody would be able to delete that file by mistakebut you also could do it the old fashioned way as you currently do itI'm actually an experience (retired) developer. So I'm familiar with various databases (sql, Berkeley, perl hash, etc).you might be an expert somewhere else, but you are an App Inventor beginner (at least you ask beginner questions)
doing the tutorials help to learn the App Inventor basicssee alsoTop 5 Tips: How to learn
App Inventor
Interestingly, that gives me an empty list as a result. Or at least a list that the subsequent code displays as an empty ListPicker1.my guess is, there is a timing issue in your blocks,It would really help if you provided a screenshot of your relevant blocks, especially where are you assigning the list to the listpicker, so we can see what you are trying to do, and where the problem may be.
Taifun