-
Notifications
You must be signed in to change notification settings - Fork 554
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
TypeError: unorderable types: SequencePath() < SequencePath() #492
Comments
Yep - someone has to make up some kind of ordering and implement |
Wow, this hit me like a train. How can I help? |
just make a pull request? sorry, i didn't find any time to think about this yet |
Is there another implementation i should look at for guidance? On 09:04, Fri, Sep 18, 2015 Jörn Hees notifications@github.com wrote:
|
No no - it's actually very easy. On py2 everything is orderable: In [26]: RDF.type/RDF.first In [27]: p1 = RDF.type/RDF.first In [28]: p2 = RDF.type|RDF.first In [29]: p2 In [30]: p1>p2 In [31]: p2<p1 BUT on py3 only explicitly comparable things are:
To fix this you have to implement lt, gt, ge etc. The actual order doesn't matter, they just have to be sortable, just make https://github.com/RDFLib/rdflib/blob/master/rdflib/term.py#L169
On 23 September 2015 at 16:14, Jörn Hees notifications@github.com wrote:
|
@gromgull thanks for the pointer... |
Ah, didn't realize this was a 2/3 issue. I didn't think clause ordering On Wed, Sep 23, 2015 at 12:40 PM Jörn Hees notifications@github.com wrote:
|
Hi,
I believe there is some error in the SPARQL parser during reordering triples with property paths
Minimal working example leading to the error:
I am using rdflib installed with pip as described in README. The output of the above script is:
I am to believe that the syntax of the SPARQL query is correct, as other SPARQL engines can deal with it (e.g. http://factforge.net/sparql?sample=prefix+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E+%0D%0Aprefix+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0Aselect+%3Fx%0D%0Awhere%0D%0A%7B+++%0D%0A++++%3Fx+rdf%3Arest%2Frdf%3Afirst+_%3A6.%0D%0A++++%3Fx+rdf%3Arest%2Frdf%3Afirst+_%3A5.%0D%0A%7D%0D%0Alimit+1)
The text was updated successfully, but these errors were encountered: