ropensci / treebase

An R interface to the treeBASE API (now on CRAN)
https://docs.ropensci.org/treebase
Creative Commons Zero v1.0 Universal
10 stars 4 forks source link

Searching by DOI fails #15

Open bomeara opened 6 years ago

bomeara commented 6 years ago

This study is in treebase: https://treebase.org/treebase-web/search/study/summary.html?id=1070. Its DOI is 10.1080/10635150490264699. Doing search_treebase('10.1080/10635150490264699', by="doi") results in

http://purl.org/phylo/treebase/phylows/study/find?query=prism.doi=10.1080/10635150490264699&format=rss1&recordSchema=tree
Extra content at the end of the document
Error: 1: Extra content at the end of the document

I suspect it is something wrong with the slash in the query. For example, if you go to the URL printed out, you get

Uncaught Exception Encountered
org.z3950.zing.cql.CQLParseException: expected boolean, got '/' at org.z3950.zing.cql.CQLParser.parseQuery(CQLParser.java:141) at org.z3950.zing.cql.CQLParser.parseTopLevelPrefixes(CQLParser.java:96) at org.z3950.zing.cql.CQLParser.parse(CQLParser.java:80) at 

followed by other errors.

URLencode() the DOI doesn't fix the issue. I've also tried manually encoding the slash as %2F but it has the same error.

EvoLandEco commented 7 months ago

I think after years the same issue persists. There is currently an issue with query in the treebase package, but your error might from the server end, I notice that the connection to TreeBASE server is very unstable, this can cause search query to fail and returns an error message instead