TIBHannover / BacDiveR

Inofficial R client for the DSMZ's Bacterial Diversity Metadatabase (former contact: @katrinleinweber). https://api.bacdive.dsmz.de/client_examples seems to be the official alternatives.
https://TIBHannover.GitHub.io/BacDiveR/
MIT License
11 stars 12 forks source link

Error: lexical error: invalid character inside string #91

Closed jotech closed 6 years ago

jotech commented 6 years ago

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 commented 6 years ago

Yeah, something like this. I already implemented https://github.com/TIBHannover/BacDiveR/commit/b9db8be05e95ffd37d7380edd366ad7a173186f9 & https://github.com/TIBHannover/BacDiveR/blob/18cb3d70229f0bbd7d09906035dadcc9ba686b4e/R/util-repair_escaping.R#L12-L17

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

katrinleinweber commented 6 years ago

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

jotech commented 6 years ago

this worked, great thank you :)

katrinleinweber commented 6 years ago

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

katrinleinweber commented 6 years ago

If you ever fill out their user survey, please mention https://github.com/TIBHannover/BacDiveR/issues/72 & https://github.com/TIBHannover/BacDiveR/issues/32 to them. The need for login credentials, and the full dataset download are causing the biggest headaches for me.

JackLMc commented 3 years ago

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 commented 3 years ago

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