Skip to content
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

calling .save() or is_present() methods of Resource raise exception #19

Open
mromanello opened this issue Feb 13, 2019 · 0 comments
Open

Comments

@mromanello
Copy link
Contributor

Background: I'm developing a python library that depends on surf, called hucitlib. I use surf to read and modify resources from a SPARQL endpoint.

Problem: the tests for hucitlib work fine with surf==1.1.9, but many of them fail if I upgrade to 1.2.0.

For example I have a bit that looks like the following:

id = Identifier(id_uri)
id.rdfs_label = Literal(urn)
id.ecrm_P2_has_type = Type(BASE_URI_TYPES % "CTS_URN")
id.save()
return True

and it fails now with this exception

E           ValueError: Statement of type [list, tuple] does not
E                                            have all the (s,p,o) members (the length of the
E                                            supplied arguemnt must be at least 3)

The bug seems to be related to surf.plugin.sparql_protocol.writer and surf.plugin.sparql_protocol.writer. It is raised whenever (in my tests) the method save() or is_present() are called. From what I understand it seems related to some of the underlying SPARQL statements being invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant