I'm using rdflib with the ZODB storage. I'm saving the ZODB Store object 
in the ZODB, and wrapping a graph around it when I need to pull it out 
and use it, which seems like what I should be doing (side note, biggest 
problem with rdflib = lack of docs ;).

However, when I want to serialize the RDF store using the following code...

 > indexDb = DB(FileStorage.FileStorage("../data/pageIndex.fs"))
 > c = indexDb.open() # Open a connection to the ZODB
 > s = c.root()["store"] # Get the store object from the ZODB.
 > g = Graph(s) # Wrap a graph around the store
 > g.save("test.rdf", format="pretty-xml")
 > c.close()

... I get a ZODB error "Cannot close a connection joined to a 
transaction" on c.close(), which indicates that the store object has 
been modified but not committed.

But serializing the graph shouldn't have changed the underlying objects, 
should it?

Of course, I can get rid of the error by aborting the transaction before 
closing the connection...

 > transaction.get().abort()

...but I'm wondering if I'm doing something wrong that I should fix. Or 
if serializing the graph actually change the data in some significant 
way so that I really should be committing whatever changes it's making?

Anyone have any ideas?

Thanks,

Matt
_______________________________________________
Dev mailing list
[email protected]
http://rdflib.net/mailman/listinfo/dev

Reply via email to