[redland-dev] [Redland Language Bindings 0000462]: Python bindings fail when selecting a datatyped literal

Mantis Bug Tracker mantis-bug-sender at librdf.org
Wed Aug 24 18:04:33 CEST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=462 
====================================================================== 
Reported By:                moustaki
Assigned To:                
====================================================================== 
Project:                    Redland Language Bindings
Issue ID:                   462
Category:                   api
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Binding Language (java, perl, php, python, ruby, tcl): python 
====================================================================== 
Date Submitted:             2011-08-24 16:04
Last Modified:              2011-08-24 16:04
====================================================================== 
Summary:                    Python bindings fail when selecting a datatyped
literal
Description: 
When selecting a datatyped literal in a SPARQL 1 or SPARQL 1.1 query, the Python
bindings print "Aborted" and die. This has been tested in Ubuntu 11.04 (Natty)
and Ubuntu 11.10 (Oneiric).

Steps to Reproduce: 
Run the following Python code:

import RDF
storage=RDF.Storage(storage_name="hashes",
                    name="test",
                    options_string="new='yes',hash-type='memory',dir='.'")
model=RDF.Model(storage)
statement=RDF.Statement(RDF.Uri("http://example.org/"),
                        RDF.Uri("http://example.org/prop"),
                       
RDF.Node(datatype=RDF.Uri("http://www.w3.org/2001/XMLSchema#int"), literal="1"))
model.add_statement(statement)

q = RDF.Query("SELECT ?int WHERE {?a <http://example.org/prop> ?int}",
query_language="sparql")
results = q.execute(model)
for result in results:
    print result

$ python redland-bug.py 
Aborted
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-08-24 16:04 moustaki       New Issue                                    
======================================================================



More information about the redland-dev mailing list