Argument () to ‘apply-to-args’ has wrong type (gnu.mapping.Values)


Argument () to ‘apply-to-args’ has wrong type (gnu.mapping.Values) (expected: procedure) at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:170) at gnu.mapping.ProcedureN.apply1(ProcedureN.java:31) at io.makeroid.companion.Screen1.processException(Screen1.yail:10101) at io.makeroid.companion.Screen1.dispatchEvent(Screen1.yail:10157) at com.google.appinventor.components.runtime.EventDispatcher.delegateDispatchEvent(EventDispatcher.java:242) at com.google.appinventor.components.runtime.EventDispatcher.dispatchEvent(EventDispatcher.java:198) at com.google.appinventor.components.runtime.Web.GotText(Web.java:615) at com.google.appinventor.components.runtime.Web$8.run(Web.java:947) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:268) at android.app.ActivityThread.main(ActivityThread.java:8101) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
Note: You will not see another error reported for 5 seconds. can you help me with these guys??

Hi Mikoto,

Welcome to the Kodular community!

The apply-to-args error is a known bug and will be fixed, but it’s just a simple error that isn’t displayed correctly.

Anyway, I believe the problem is simply that you decoded the responseContent without converting it into a dictionary.

JSONTextDecode converts JSON into a list of lists, so you just need to use listOfPairsToDictionaryPairs.
blocks(107)

Make sure you have valid dictionary. Else share us the sample of your global response

Are you sure is you’re URL correct

https://api.openweathermap.org/data/3.0/onecall/timemachine?lat={lat}&lon={lon}&dt={time}&appid={API key}

And what response are you getting?