iDigBio / idigbio-search-api

Server-side code driving iDigBio's search functionality.
GNU General Public License v3.0
24 stars 5 forks source link

Recordset Endpoint #24

Closed kevinlove closed 7 years ago

kevinlove commented 7 years ago

Getting errors when running this code

library(jsonlite)
rsEP <- "http://search.idigbio.org/v2/search/recordsets?limit=1"
rsDF <- fromJSON(rsEP)

Any ideas @mjcollin ?

sckott commented 7 years ago

works fine for me - what errors are you getting?

godfoder commented 7 years ago

Kevin and I were testing this out on his computer and getting an error. I think the problem we were having was not explicitly with the code aboce, but with using the View function in RStudio on the dataframe created.

library(jsonlite)
rsEP <- "http://search.idigbio.org/v2/search/recordsets?limit=2000"
rsDF <- fromJSON(rsEP)

Works fine, and the dataframe can be used subsequently to perform the needed operations.

Using View(rsDF) produces the error: 'names' attribute [1] must be the same length as the vector [0]. which is the error we were getting on his computer as well.

I think that at some point this worked, and that he had the dataframe pinned open in RStudio, so that it was generating an error message every time he tried to refresh that data.

sckott commented 7 years ago

@kevinlove I'm on version 1.2 - i wouldn't expect there to be a problem with jsonlite itself unless there was a server error or something

kevinlove commented 7 years ago

Thanks, we will chalk this one up to having a bad day. Thanks for the extra info everyone.