ropensci / rcrossref

R client for various CrossRef APIs
https://docs.ropensci.org/rcrossref
Other
166 stars 20 forks source link

New JSON error error w dev version #232

Closed majohansson closed 2 years ago

majohansson commented 2 years ago

I was getting similar JSON error messages as posted before, so installed the dev version of the package and now get the following error:

require(rcrossref) Loading required package: rcrossref cr_works(query="NSF") Error: lexical error: invalid char in json text.

We'v (right here) ------^ </blockquote> <!-- If this issue relates to usage of the package, whether a question, bug or similar, along with your query, please paste your devtools::session_info() or sessionInfo() into the code block below. If not, delete all this and proceed :) --> <details> <summary><strong>Session Info</strong></summary> ```r R version 4.2.0 (2022-04-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.5.1 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base other attached packages: [1] rcrossref_1.1.0.99 loaded via a namespace (and not attached): [1] Rcpp_1.0.9 plyr_1.8.7 compiler_4.2.0 [4] pillar_1.8.1 later_1.3.0 tools_4.2.0 [7] digest_0.6.29 jsonlite_1.8.0 lifecycle_1.0.1 [10] tibble_3.1.8 pkgconfig_2.0.3 rlang_1.0.4 [13] shiny_1.7.2 cli_3.3.0 DBI_1.1.3 [16] rstudioapi_0.13 crul_1.2.0 curl_4.3.2 [19] fastmap_1.1.0 xml2_1.3.3 stringr_1.4.1 [22] dplyr_1.0.9 generics_0.1.3 vctrs_0.4.1 [25] htmlwidgets_1.5.4 triebeard_0.3.0 DT_0.24 [28] tidyselect_1.1.2 glue_1.6.2 httpcode_0.3.0 [31] R6_2.5.1 fansi_1.0.3 purrr_0.3.4 [34] magrittr_2.0.3 urltools_1.7.3 promises_1.2.0.1 [37] ellipsis_0.3.2 htmltools_0.5.3 assertthat_0.2.1 [40] mime_0.12 xtable_1.8-4 httpuv_1.6.5 [43] utf8_1.2.2 stringi_1.7.8 miniUI_0.1.1.1 ``` </details> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/majohansson"><img src="https://avatars.githubusercontent.com/u/5141596?v=4" />majohansson</a> commented <strong> 2 years ago</strong> </div> <div class="markdown-body"> <p>Update here. This appears to be something else I have triggered on my end inadvertently. What is being returned is html for this page: <a href="https://assets.crossref.org/ip-blocked_api.html">https://assets.crossref.org/ip-blocked_api.html</a>. HTML not JSON, thus the error from rcrossref. However the problem is something I did wrong somewhere and I will try to sort that out. Not an rcrossref problem.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>