Your message dated Tue, 5 Mar 2024 12:13:25 +0100
with message-id <[email protected]>
and subject line Re: python3-rdflib: Fails to parse local RDFa file
has caused the Debian Bug report #849079,
regarding python3-rdflib: Fails to parse local RDFa file
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
849079: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849079
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
On Thu, 22 Dec 2016 15:47:10 +0100 Olivier Berger
<[email protected]> wrote:
> 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)
This works with the new organization of packages, with python3-pyrdfa
version 3.5.2+20220621~ds-1 installed, your example works using
http://www-public.telecom-sudparis.eu/~berger_o/papier-icssea2011/papier-icssea2011.html
Though I do get messages like "html5lib.html5parser.ParseError: Trailing
solidus not allowed on element code"
--
Michael R. Crusoe
OpenPGP_signature.asc
Description: OpenPGP digital signature
--- End Message ---