Package: python3-rdflib
Version: 4.2.1-2
Severity: normal
Tags: upstream
Dear Maintainer,
The following script won't parse a local RDFa file :
from rdflib import Graph
g = Graph()
g.parse("papier-icssea2011.html", format="rdfa")
len(g) # prints 2
import pprint
for stmt in g:
pprint.pprint(stmt)
It seems that provides an explanation, as patching
/usr/lib/python3/dist-packages/rdflib/plugins/parsers/pyRdfa/__init__.py
by commenting line 448 (not setting self.charset = 'utf-8' when
provided a local file) will solve the issue.
I guess a better fix upstream should be needed though
Hope this helps.
Best regards,
-- System Information:
Debian Release: stretch/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages python3-rdflib depends on:
ii python3-isodate 0.5.4-1
ii python3-pyparsing 2.1.10+dfsg1-1
pn python3:any <none>
Versions of packages python3-rdflib recommends:
ii python3-html5lib 0.999999999-1
ii python3-sparqlwrapper 1.7.6-2
Versions of packages python3-rdflib suggests:
ii python-rdflib-doc 4.2.1-2
-- no debconf information