-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent RDFa parser from failing on time elements with child nodes #577
Conversation
The _get_literal() function in the RDFa parser referred to a self instance that does not exist. This led to a NameError exception if the HTML to be parsed included a TIME element with one or more child nodes, such as '<time><em>2016-01-01</em></time>'. Removing the reference to 'self' fixes the problem and fixes RDFLib#576. Signed-off-by: Dan Scott <dan@coffeecode.net>
hmm, actually same problem as with pyMicrodata: maybe such things should go to https://github.com/RDFLib/PyRDFa or https://github.com/RDFLib/pyrdfa3 so they could be included in upstream test cases? @iherman ? |
Thanks @dbs and @joernhees. I have made the change in the https://github.com/RDFLib/pyrdfa3 repo (see RDFLib/pyrdfa3#13). The https://github.com/RDFLib/PyRDFa is explicitly marked as 'outdated', so I did not touch it. |
I do not do merges of PR myself, I leave that to @joernhees ... |
Prevent RDFa parser from failing on time elements with child nodes, backported in RDFLib/pyrdfa3@f1030e7
I keep hitting this bug over and over. Is v4.2.2 going to be released any time soon please so I can just depend on that version in all my builds? |
@avengerpenguin sorry for that... my plan was to fix a couple of SPARQL bugs (Milestone 4.2.2) before the release, but i couldn't find enough time to work through them yet... maybe we should just release 4.2.2 and care about the SPARQL issues in a future release? |
That's up to you if you feel 4.2.2 is in a fit state to be released. I would normally advocate a bug fix release for each bug just to get fixes out there for people, just as with my situation where I would benefit from this issue being fixed in a proper package and I haven't encountered any of the SPARQL bugs you're holding off the release for. Nothing's stopping you having a 4.2.3 release with those bugs fixed when you have time :-) If you think 4.2.2 has is no worse than 4.2.1 and it has this issue fixed in it, then please do release it if you can. |
I've got my application building ok using the master branch of this repo, so that takes some pressure off me. I guess it'd still be nice to see a release with this fix and any other fixes if 4.2.2-dev has fewer bugs than 4.2.1. |
The _get_literal() function in the RDFa parser referred to a self instance that
does not exist. This led to a NameError exception if the HTML to be parsed
included a TIME element with one or more child nodes, such as
'2016-01-01'. Removing the reference to 'self' fixes
the problem and fixes #576.
Signed-off-by: Dan Scott dan@coffeecode.net