owltools icon indicating copy to clipboard operation
owltools copied to clipboard

Parse error using .obo URLs

Open kimrutherford opened this issue 5 years ago • 18 comments

Hi.

We're seeing a problem with .obo URLs using the 2020-04-06 release.

Command lines this work fine:

owltools http://purl.obolibrary.org/obo/cl.owl --ancestors neuron

But changing to a .obo purl results in a parse error. Here's an example:

owltools http://purl.obolibrary.org/obo/cl.obo --ancestors neuron

Here is the full output from the command: errors.txt

@jseager7 noticed this in the error output and suggested that perhaps the 304 redirect isn't being followed:

Parser: org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser@35835fa
    Stack trace:
LINENO: 1 - Could not find tag separator ':' in line.
LINE: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">        org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:60)

The pattern seems the same with other ontologies. @jseager7 first noticed the problem with: http://purl.obolibrary.org/obo/phipo/phipo-simple.obo

Please let us know if you need any other details.

Thanks.

kimrutherford avatar May 27 '20 12:05 kimrutherford

I noticed that as well! High priority, because it happens for robot as well! @balhoff @jamesaoverton

robot -vvv merge -i http://purl.obolibrary.org/obo/cl.obo -o test.obo

matentzn avatar May 27 '20 15:05 matentzn

@matentzn so must be related to OWL API version?

balhoff avatar May 27 '20 15:05 balhoff

But that has not been updated for so long! No one noticed for such a long time?

matentzn avatar May 27 '20 15:05 matentzn

By the way your command should be: robot -vvv merge -I http://purl.obolibrary.org/obo/cl.obo -o test.obo

(does show the problem)

balhoff avatar May 27 '20 15:05 balhoff

Oh yeah sorry.

matentzn avatar May 27 '20 15:05 matentzn

@ignazio1977 did we know about this? Is this a problem with how the obo purls are redirected?

matentzn avatar May 27 '20 15:05 matentzn

owltools is on OWL API 4.5.6. I tested rolling back to 4.5.1 and it works again.

Update—4.5.4 also errors. For some reason I can't compile owltools with 4.5.2.

balhoff avatar May 27 '20 15:05 balhoff

owltools has been using this OWL API version for about 18 months: https://github.com/owlcollab/owltools/commit/ad678691f43d1cdb1c445a294f77ac9f6ed3fc26#diff-852a5f234948b0c35064c26937d12558

Not sure how no one noticed this!

balhoff avatar May 27 '20 16:05 balhoff

@matentzn Nothing I'm aware of but the OBO parser manages imports and URL loading differently from the other parsers, and more so in those fairly ancient releases.

ignazio1977 avatar May 27 '20 20:05 ignazio1977

Thanks, @ignazio1977, do you know if anyone has changed the OBO parser between 4.5.1 and 4.5.6?

matentzn avatar May 27 '20 20:05 matentzn

Most likely me :-) I'll replicate and see if it can be fixed.

ignazio1977 avatar May 27 '20 20:05 ignazio1977

Thanks a ton! :)

matentzn avatar May 27 '20 21:05 matentzn

Failure can be replicated on the latest version 4 but not on version 5 and 6. So this seems tied to the changes in handling HTTP connections, if I remember correctly we changed http libraries in version 5.

ignazio1977 avatar May 27 '20 22:05 ignazio1977

Thanks a lot @ignazio1977! Do you think the churn is too high to fix this for the 4.X versions of OWL API as well? I have started to migrate some tools to 5 and 6, but it may take a while for other toolkits like this here owltools to catch up..

matentzn avatar May 28 '20 06:05 matentzn

Can't tell just yet.

ignazio1977 avatar May 28 '20 19:05 ignazio1977

Adapting the obo parser to behave like the other parsers seems to have been effective. https://github.com/owlcs/owlapi/commit/7919ca9b865b703cf0ac9c70efbba10968b1206a

ignazio1977 avatar May 28 '20 22:05 ignazio1977

Wow that is a serious change :) THANKS a lot! If you remember to: ping us when the change is live. Thank you again!

matentzn avatar May 29 '20 07:05 matentzn

Fix included in OWLAPI 4.5.17

ignazio1977 avatar Jul 05 '20 08:07 ignazio1977