Skip to content

Exception when serializing QuotedGraphs to N3 #291

Closed
@ericpeden

Description

@ericpeden

Attempting to N3-serialize a graph with a formula in it (as shown by this quick and dirty test case) results in the following error:

Traceback (most recent call last):
  File "/home/eric/src/rdflib/test/test_n3.py", line 208, in testModel
    g.serialize(format="n3")
  File "/home/eric/src/rdflib/rdflib/graph.py", line 903, in serialize
    serializer.serialize(stream, base=base, encoding=encoding, **args)
  File "/home/eric/src/rdflib/rdflib/plugins/serializers/turtle.py", line 206, in serialize
    subjects_list = self.orderSubjects()
  File "/home/eric/src/rdflib/rdflib/plugins/serializers/turtle.py", line 64, in orderSubjects
    recursable.sort()
  File "/home/eric/src/rdflib/rdflib/term.py", line 168, in __lt__
    return _ORDERING[type(self)] < _ORDERING[type(other)]
KeyError: <class 'rdflib.graph.QuotedGraph'>

3.4.0 doesn't exhibit this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions