Occasionally get "attempt to apply non-function" error when applying getForm

I'm using getForm to repeatedly pull data from an api. Sometimes the program finishes, and other times after some amount of iterations, I get the following error message:

Error in curlPerform(url = url, curl = curl, .opts = .opts) : 
attempt to apply non-function
In addition: There were more than 50 warnings (use warnings() to see the first 50)
> traceback()
5: .Call("R_curl_easy_perform", curl, .opts, isProtected, .encoding, 
   PACKAGE = "RCurl")
4: curlPerform(url = url, curl = curl, .opts = .opts)
3: getURLContent(uri, .opts = .opts, .encoding = .encoding, binary = binary, 
   curl = curl)
2: getForm("https://xx", .params = parval)
1: fromJSON(getForm("https://xx", 
   .params = parval)) at #32

the warnings are:

In RCurlIconv(str, from = "C99", to = encoding) :
UTF-8 not supported iconv entries

Thanks for your help!


It's just a download error, sometimes the download fails. I just put in a provision to try the download again in that case.

Need Your Help

Visitor pattern - adding new ConcreteElement classes is hard?

oop design-patterns visitor-pattern

I read a book about the visitor pattern. It gives the same class diagram as in the oodesign's website.

Hiding Day in calendar control (whole day column)

c# asp.net .net calendar

I have calendar control in my page. It displayed all days of the week. Now, I want to delete Wednesday from the calender control. Only six days need to displayed.