Error: Select list item: Attempt to get item number 1 of a list of length 0

Hello Guys,
I am getting “Select list item: Attempt to get item number 1 of a list of length 0: ()” error. I don’t know why.
image

Check my Blocks

1 Like

your list length is 0 that means empty then how can it get the item at index 1 where the list is empty

1 Like

Can you tell me how can I do this?

1 Like

your list need to contain something

1 Like

Data is showing proper in app.
image

so where the error is coming

After removing show data block app don’t give any error.

because select list item block is in Show_Data function

One of the select list item blocks is using index ‘1’ for a list that is empty. Work through your code and use the do it (right click blocks) method to triangulate which one it is.

For example don’t call the show data procedure after the firebase block and then use do it on each list you are selecting from to see which is empty.

add this block


list length -1

It’s working but some data is not coming.

try doing + 1

After +1 not working.

then - 1 is correct maybe your database does not have the values??

image

wait for someone to help i am really confused :roll_eyes:

wait a minute. I know where your mistake is


add another block for dynamic label

Your blocks in another language that i can’t understand. Please show in english.

it is not necessary! do as i showed