Spreadsheet Data Retrieval Failure

I am trying to make an app that can verify whether the manufacturer of a cloth is part of a sustainability standard. So, using a picture of the cloth's tag, it uses OCR to retrieve the text on it and then use Gemini to retrieve the manufacturer text from it. Until this point, the app is functioning properly.

Firstly, I get this prompt every time i connect or refresh the companion:

After this, when i try to retrieve the names of manufacturers in a spreadsheet database of the GOTS sustainability standard in order to match its content with the manufacturer name, I get this error:
image

I have tried to use the following components to retrieve the data:

  1. Web component
  2. Spreadsheet Component
  3. Data File
  4. File

I tried each after the one above it failed. By using each method, i got the same runtime error. No data is being retrieved.
I tried debugging, but am unable to. My spreadsheet is open to view to anyone with the access to the link.

If you could figure out the error, please tell me how to debug. Also, if these will not work, is there any other way to retrieve the data in a spreadsheet, and make a list out of the 1st vertical column?

Here are my code, and component settings snippets:

Code:

Web Component:
image

Spreadsheet Component:
image

What is this ?

image

Are you attempting to access the data in the spreadsheet ? If so, you may need to enhance your url:

Or you could use gviz to query the data and e.g. return only one column of data

Also check your companion version.

Thanks, but could you explain what tbQuery is?

I assumed it was the button, so I tried the code, but i got this error:
image

This was the code:

tbQuery is the textbox that contains the ... query

image

1 Like

Okay, thank you

Thank you so much for all of your help. It worked!

I had tried the code in a separate app for my ease. It worked there. But now when I tried implementing the same in my actual app, I get a this error:

But I have added the Web component, so I can't understand why such an error would come.

Attaching the entire code:

Can anyone understand the cause of this error? Please help me out.

disconnect the companion, refresh the page then reconnect the companion

It still gives the same error

You may have copied the blocks, but did you pull in the Web component in the Designer?

My guess is the project got corrupted somehow

Taifun

Better share your aia to assist you better. Even after closing the tab and reopen also throwing this error? If so then it is corrupted as said by the expert's

Yes, I have pulled in the Web component:

What do i do in case the project is corrupted? Should I re-write the same code in a different project?

If possible can you share your aia?

Sure, attaching it...

Cloth_Sustainbility_Checker.aia (2.7 MB)

But i get different issue and not that web1 not found error

Looking to it. May be confusion with itoo

I get the same error too - the meta tag one - every time the companion connects or reloads. Could you debug?

As i guess it was due to that recy1 extension. Where did you download it? When i remove it, another extension also was got deleted and i find no any of the above said error appears

See, now No error in companion

After removing that incomplete extension

Thank you so much. The text recognition extension was initially giving me some problems. So I tried Recky as an alternative, but found the former more useful and stuck to it later on.
I never imagined that the extension would be the cause.
Thank you, it works perfectly now.

1 Like