The operation add items to list cannot accept the arguments [*empty-string*], [Metro1]

Hi,

I am using an api and this error is coming

blocks:

json: http://earns4u.tk/data/livetvnew//api/get_category_posts/?api_key=cda113KYReHDztQbZWXksIpuVLE2UNiJ1rhFxC6Bo4TOal7Ajg&id=40&count=100

response is a list and if the key “posts” was not found in the JSON string, then the text “not found” will be assigned to the global variable response, which results later in that error, because a text is not a list

you might want to replace the text block “not found” by a create empty list block
btw. a better name for the global variable response would be listResponse


EDIT: after looking again at your blocks, the error probably might occur somewhere else… how do you initialize the name and url lists? As we can see, you initialize the list url with empty text, this should be a create empty list block, same for name…
Unbenannt
you might want to rename all list variables and add a prefix… listName and listUrl…
Taifun

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.