# Send Data to thingspeak.com Error message

Hi, i try to send Data to thingspeak.com. In Snap I use the url-Block with the Code from the Thing-Speak-Website. It works. I see the Data on thingspeak. But then I get this error message. The number I get back ist the number of the entry in the thingspeak-table. When I use the code in a normal Browser i get this number too. But the url-block seems too expect someting else. The Message is "expecting a ring but getting 49 (for the 49th entry in thingspeak)

A solution I found is using the "catch errors in script" function out of the library. But im not sure that this is good for long time stability.
My aim is building a weather station with rasppi and arduino an Snap4 Arduino

The url block doesn't report rings or functions, which are the only things that can be in the run block for it to work. I barely know anything about the website, but the page api.thingspeak.com/update seems to be only numbers.

Oh, I think I know what you want to do: create a command block with one input, but leave the definition empty; the input will be evaluated (e.g. the url block will do the update) and that's it.
Edit: much simpler solution: ringify the url block.

The answers above are all correct, but I'm not sure they're understandable.

In Snap!, functions are a kind of data. When something has a ring around it, like or,in your case, , its value is the function itself, not the result of calling the function.

The RUN block requires a function (well, what it really wants is a command script; it's CALL that wants a function) as its input. What you gave it as input is what thingspeak.com returns, namely 49. That's why it's complaining.

The minimum-mouse-click solution once you already have a RUN block in your code, as @snapenilk says, is to control-click or right-click the URL block and choose "ringify" from the menu. But conceptually that's needlessly complicated. You just want to ignore what the URL block reports:

That's it--that's the entire procedure definition. Nothing under the hat block. Then you can say

The IGNORE block is in the "iteration, composition" library, the first one in the list.

Hey, thank you for the fast help. I´m not sure I understood completly all you explained, but doesn´t matter. I´m on a self-education-trip in programming and building little interactive machines, and I feel there´s still a lot to learn. I read the SNAP Manual again, and I think, I understand the concept of "ringifying" now a little better. I tried out the "ringifying", an it works. No error message. Thanks

Or you could do:run(JSF(a){console.log(a);}w/inputs:url(...))