Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: lexical error: invalid character inside string #91

Closed
jotech opened this issue Aug 30, 2018 · 7 comments
Closed

Error: lexical error: invalid character inside string #91

jotech opened this issue Aug 30, 2018 · 7 comments
Assignees
Labels

Comments

@jotech
Copy link

jotech commented Aug 30, 2018

Hi,
thank you for providing this useful package :)

Besides most queries working quite well, I'm having problems to get data for a specific bacdive id:

retrieve_data(searchTerm=76, searchType = "bacdive_id")
76 Error: lexical error: invalid character inside string.
          r with 200 mg cycloheximide ml 21", "enrichment_cult_composi
                     (right here) ------^

The corresponding entry is:
https://bacdive.dsmz.de/search?search=76

I'm not sure what causes the error maybe a linebreak?

@katrinleinweber
Copy link
Collaborator

Yeah, something like this. I already implemented b9db8be &

repair_escaping <- function(JSON, char) {
gsub(
pattern = paste0("\\", char),
replacement = paste0("\\\\", char),
perl = TRUE,
JSON

to catch those, but it seems there is another one. Thanks for posting the exact entry. I'll start digging into this.

@katrinleinweber
Copy link
Collaborator

Ah, I implemented that repair only during aggregation of multiple datasets, not for an individual. Fix incoming 🎉

@jotech
Copy link
Author

jotech commented Aug 31, 2018

this worked, great thank you :)

@katrinleinweber
Copy link
Collaborator

I thank you for being the 1st actual user to provide feedback on this R package :-)

@katrinleinweber
Copy link
Collaborator

If you ever fill out their user survey, please mention #72 & #32 to them. The need for login credentials, and the full dataset download are causing the biggest headaches for me.

@JackLMc
Copy link

JackLMc commented Sep 21, 2021

This seems to have cropped back up as an issue in bd_retrieve(id = "717")
In fact, when testing all the examples, I am getting the same lexical error.

@katrinleinweber
Copy link
Collaborator

katrinleinweber commented Sep 28, 2021

Hi @JackLMc 👋 Please see #118 for the reason. Thanks for trying BacDiveR, nonetheless :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants