liibre / Rocc

Get species occurrence data from speciesLink and GBIF, and species lists from the Brazilian Flora 2020. Perform basic taxonomic checks based on Brazilian Flora 2020. Download GADM, WDPA and DIVA-GIS gazetteer shapefiles.
https://liibre.github.io/Rocc/
16 stars 5 forks source link

unable to runrspeciesLink() #3

Closed JuliaNiemeyer closed 4 years ago

JuliaNiemeyer commented 4 years ago

Making request to speciesLink... Error in open.connection(con, "rb") : HTTP error 400.

Show traceback:

7. open.connection(con, "rb") 6. open(con, "rb") 5. parse_con(txt, bigint_as_char) 4. parseJSON(txt, bigint_as_char) 3. parse_and_simplify(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, simplifyMatrix = simplifyMatrix, flatten = flatten, ...) 2. jsonlite::fromJSON(my_url) 1. rspeciesLink(filename = paste0("raw_dataSpeciesLink", scientificName[a]), scientificName = scientificName[a], Coordinates = "Yes")

I have newest version of the function and also have unistalled and reinstalled R and RStudio in my computer. It's been weeks since this error is showing.

saramortara commented 4 years ago

Julia, the function is running fine and it has been stable in the past days. The vignette using_rspeciesLink.Rmd works 100%. It is common for the speciesLink's server not to work now and then, and it also happens with gbif.

JuliaNiemeyer commented 4 years ago

Thank you for the reply,

As you said via email it doesn't seem to be a problem with the server because it works fine when you run it. Any ideas about where the error might come from? Because this has been happening to me for the past 2 weeks.

saramortara commented 4 years ago

Can you provide a reprex? You may be creating a bad request

JuliaNiemeyer commented 4 years ago

Yes, my code Specieslink_clean can be found here: https://github.com/JuliaNiemeyer/Data_cleaning/tree/master/SpeciesLink All the data you may need to run the script if you want can be found here : https://github.com/JuliaNiemeyer/Data_cleaning/tree/master/data

saramortara commented 4 years ago

Parts of a reproducible example:

background information - Describe what you are trying to do. What have you already done? complete set up - include any library() calls and data to reproduce your issue.

make it run - include the minimal code required to reproduce your error on the data provided. People should be able to copy and paste your code chunk and get the same error.

complete set up - include any library() calls and data to reproduce your issue.

minimal - strip away everything that is not directly related to your problem. This usually involves creating a much smaller and simpler set of code and data compared to that which created your issue.- include any library() calls and data to reproduce your issue.

saramortara commented 4 years ago

Julia, qual sistema operacional você está usando? Se não for Unix é possível que tenha problema com a url. Já atualizamos o pacote. Por favor instale de novo e se ainda tiver problemas poste uma issue com um reprex

JuliaNiemeyer commented 4 years ago

Sara, muito obrigada pela ajuda. Parece que agora milagrosamente está funcionando. Na próxima eu aprendo a construir um reprex antes de ir até vocês. Desculpe por qualquer transtorno.

Abs.,

Em ter., 28 de abr. de 2020 às 13:51, saramortara notifications@github.com escreveu:

Closed #3 https://github.com/saramortara/rocc/issues/3.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saramortara/rocc/issues/3#event-3281229773, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRGCJ26YALIQYYLEUETMC3RO4CPPANCNFSM4MSH6BEQ .

-- Julia de Niemeyer Caldas

Laboratório de Vertebrados - Depto Ecologia - IB - UFRJ Rede Brasileira de Pesquisas sobre Mudanças Climáticas Globais - Rede Clima/INPE/MCTIC Lattes: http://lattes.cnpq.br/7166082149089652