Runtime error (Infinity or NaN: Infinity)

When i scan the qr code it shows me this error
help please !

Can you show what you are trying to do? NaN should mean "Not a Number"? Are you trying to use a string in a calculation?

1 Like

this the from where the error is coming

So it appears after you scan the code and not when you press the button?

No i have a button to scan the QR code and after scanning it the result appears in the textbox and you gave to click on find button
so the problem is when i click on the find button

You use a lot of globals. Did you try Do it to see if everything gets the value as it should? What are globals nothing and globals numbers?

nothing is an empty list so it resets the listwiew elements and numbers is the refences of machines and names is their names and price is their prices and they are all in google sheets(csv table list)

the problem is from index in list because i tried to change it with an index and it worked
is there any way to khow the index of something without index in list block ?

Yes Index wants an integer.


names and price also have global number.

Please give an example how numbers looks?

the first one is number the second is name and the third is price
By the way there are 2619 items in each list
(2619 number,name and price)

So number.text is an integer after splitting the result from the scan? That's why you can use Do it, to check every part of your code.

Sorry i don't understand you

You are splitting the result from the scan and put a part of it inside number.text. How does that part look like?

This gives the result 12 as the index numbers


This gives the result ab as the content of the list.

1 Like

Connect companion, right click on blocks and use Do it to debug your blocks an example can be found


Okay thank you

This what every qr code gives
(Text) is what i need

Okay i will change something and i see if it works

Perhaps this might help?