2017년 7월 25일 화요일

Help. List csv problem!?


I use and combine the project FilebyFile_Drive and Import CSV to make the list for the variable listFilename. I get error : list to large...
Somebody can tell me where i have to look to repair the error.
Thank you very much for your time and help.



--
my guess is, the error message is "list index too large"?
so if listFilename is empty, how do you want to get a filename from that list?
you might want to import the csv file first  covert it into a list and assign it to listFiename before starting the download
--
Thank you for your help. I was trying another method, but is the same error. Why ?

--
It would really help if you provided a screenshot of your relevant blocks and a screenshot of your error message, so we can see what you are trying to do, and where the problem may be.

--
It is simple.  I want to replace   listfilename and listfiledrive with csv to escape the lag of the block  make list when have a lot of items. Thank you for your  quickly response.

--
yes, it's simple
so what prevents you from doing it?
you might want to import the csv file first, covert it into a list and assign it to listFilename, same with listFilenameDrive before starting the download

--
Ok. i import csv,convert to list and assihn to filename, but something is wrong. What ?




--
Look at where you set up global variable listFileName.

That's not much of a list.

I don't see any blocks any where else to load it as a list either.



--
Any suggestions ?

--
yes, but the suggestion is still the same...
you might want to import the csv file first, covert it into a list and assign it to listFilename, same with listFilenameDrive before starting the download
you might want to start trying something

--
I am trying, but i dont succeed.



--
I get error list index smaller than 1. Why ?
I get the list and now i must attach to variable listfilename ? How ?

--
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

--
Where is the File1.GotText event block to accept
the contents of //import.csv ?

--
Sorry i forgot to put the new picture. :(
I post now.
The error it says : cannot get the item 1.



--
Where is the place where global listFileName  changes from a piece of text
to a list?

--
I put in File1 got text. 



--
Why it says: List idnex smaller than 1 ?
Select list item: Attempt to get item number 0, of the list((//import.csv)). The minimum nr is 1.
Why ? Any suggestion how to fix ?



--

to convert a 1 column csv table into a list, use the split block and split at \n (new line) to get a simple list

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

--
it does not look like you are familiar with Do it?
see the 4 here
--
You must learn the difference between a thing and the image of a thing,
the famous Rene Magritte painting This is not a pipe.

The text that came from the file may look like a list,
but is not a list.

--
Another example of the difference between things
and things that look like things ...

courtesy of the Road Runner.

--
I am but my emulator has lag, and the windows cant find my device.

--
Now i learn new thing. Thank you.

--
ok. I did.
Next what should i do ?



--
ok. Thanks. I get it. :P

--
I have spend many hours but i am not succeed. Maybe if you give an example how can i done this.  Please help !?

--
See attached.

You were wrong but lucky.

You split the text from the file at \n, and that gave you a list.
(Read the tool tip for the split block, don't believe me.)

If all there was in each line of the file was just a single file name,
that was all you needed.

You inserted a block that was not needed, forcing extra conversions to happen
behinds the scenes ...

The list from csv table block wanted a piece of text, so 
it converted the list back into a piece of text before trying
to convert it into a list of lists.

That was unnecessary.

I'll bet you could remove that block and it will still work.

--
Still not working. Any suggestions ?




--
See attached for what you have in import.csv.

It is a good idea to look at what you eat before putting it into your mouth.


--
I don't understand. Those  is the names of the files to be downloaded.  What is wrong?

--
import.csv contains a single row of items (your filenames) separated by commas (,) not new lines (∖n) ?

You are creating a list by splitting at new lines (∖n), of which there are none!

--
Thank you.  I modify this file so many times... I miss that. My mistake.  Thank  you all for your time, help and understanding.

--
I still have this error: "Select list item: Attempt to get item number 0, of the list (). The minimum valid item number is 1."
Why ?

-- 
It's time for you to get the Companion working in an emulator or on your device.

Look in the Companion and Emulator section for how to install one of
the other emulators, like GenyMotion or the Chrome add-on.

Working without the Companion is like working
with one eye tied behind your back..

-- 
Thank you ABG,Thank you All.
I start from 0.
Somebody help me to transform this lists to csv, please.
Thank you for your time.





--
I found half of the solution.
1 Picture have half of the solution.
The problem is in 2 picture. What i have to change to work ?



--
Read the file using a file block.
Use the Do It to see what is in the global list.

--

댓글 없음:

댓글 쓰기