[redland-dev] rss-tag-soup parser throws error
Dave Beckett
dave.beckett at bristol.ac.uk
Thu Feb 10 17:13:20 GMT 2005
On Thu, 2005-02-10 at 17:51 +0100, Kai Bielenberg wrote:
> Hi,
Hi
This one's easy :)
> i have this python snippet:
>
> import RDF
> model=RDF.Model(storage=RDF.MemoryStorage())
> parser=RDF.Parser(name='rss-tag-soup',mime_type='application/rdf+xml')
That says give me a parse with name rss-tag-soup AND with the mime type
of RDF/XML. That condition isn't met since the rss-tag-soup covers
multiple mime types so doesn't register itself as covering one only.
So... parser return null. (maybe the registration should cover multiple
mime types in future, but it doesn't right now).
Fix:
parser=RDF.Parser(name='rss-tag-soup',mime_type='')
In the python bindings 1.0.0.2 I've added a convenience class for this
which will allow parser=RDF.RSSTagSoupParser()
>
> uri=RDF.Uri(string="http://del.icio.us/rss/kaiman")
> parser.parse_into_model(model,uri)
>
> this throws the following error:
>
> rdf_parser.c:348: (librdf_parser_parse_into_model) assertion failed:
> object pointer of type librdf_parser is NULL.
yeah, it really shouldn't do that. I wonder why 'parser' isn't None?
> Initializing the parser with name="rdfxml" works fine. Using rapper -i
> rss-tag-soup http://del.icio.us/rss/kaiman works also fine.
>
> I am using Raptor 1.4.5, Redland 1.0.0, Redling-Bindings 1.0.0.1
Cheers
Dave
More information about the redland-dev
mailing list