Something wrong with "add items to list"

Hello,
Through troubleshooting I found that there is an something wrong with the block, "add items to list" in my code
I am making a list picker that allows me to create a new panel of buttons based on the selection, using the dynamic components extension.
vertical_arrangement1 is a variable that increments by 1 each time a new button is created.
I am trying to use the variable verticalarrangementids as list to store the IDs of the buttons so that it can be recreated using tinydb, which works by storing the value of vertical_arrangement1 in the list.
However something is wrong with the add items to list block which is causing my code to not work. Everything else mentioned is working fine. Anyone know what could be the problem?

Screenshot 2025-05-17 10.17.18
Screenshot 2025-05-17 10.17.59

First thing of course is that if the code is handling button components, it would be a good idea to reflect that in your var names.

  1. Has "Verticalarrangmentids" been initalised as a List?
  2. Is "vertical_arrangement1" an integer greater than zero?
  1. What was the error it cause?
  2. Have you added set vertical arrangement 1+ get vertical arrangement 1 before this add items to the list?

If you show all the relevant blocks it could be easy gor us to guide you. Also of you click on do it option on all the global variable you may find the problem yourself. Else share us the result

  1. Yes, it has been initialised as create empty list
  2. Yes it is

The error message is "the operation add items to list cannot accept the arguments: , [0]"

  1. The error message is "the operation add items to list cannot accept the arguments: , [0]"
  2. Yes, I have already incremented the vertical arrangement 1 before the add items to list block

I would send the code but it's massive and a lot of it is irrelevant to the issue

Is this full error?

Because it miss the global list in which you adds the item also f it saya error with index 0 which mean your increment is not added properly.

If possible show us full blocks

1 Like


Please note the blocks aren't fully complete yet, and I'm still working on them, particularly for for 2, 3, and 4 switch.
The issue is currently in the 1-switch, which I am stuck at

I caught a quick peek at your code, and I have to recommend a recent tutorial on how to deal with not found lookups ...

1 Like

I think you need to upload your Project here (.aia) and hopefully a Power User can find the time to study it.

1 Like

The error message didn't mention a not found error though, just "the operation add items to list cannot accept the arguments: , [0]"

When you get this error, that time click on all the global variable which are associated with add items to the list. I am sure you will be identity your problem. Else click do it on all global variable, take screenshot and send us

1 Like

The Not Found situation raises no errors, but provides an opportunity to return something inappropriate, to be discovered later.

1 Like

Sorry, how do you do that? I tried by getting the variable and displaying it on a button right after the screen loeaded, and the results are:

Verticalarrangementids are 0
Vertical_arrangement1 is 1

(Starting value for vertical arrangement 1 is initialised to 1, vertical arrangementids are initialised to create empty list).

Same tag, different purposes?

1 Like

Thanks for pointing this out, I fixed it but the same error is still showing

TinyDB is polluted.

Flush it out.

I just discovered a combination that leads to Project corruption:

Windows 11 + FireFox 138.0.4

If you have the same, switch to Chrome.