Closed andreaBelmont closed 4 years ago
@cmungall We aren't having this problem in the test suite are we?
@andreaBelmont Please take a look at our test suite and travis ci stuff. @cmungall Uses a comparable docker based set up for running the Pengine, and our tests don't seem to be having problems.
I suspect at least part of the problem is our documentation is out of date.
Just saw this: I am going to take a look.
@andreaBelmont Let me know if it's not making sense.
You are right, I am now able to run the query by first running the docker container
docker run -d -p 4242:9083 -e PORT=9083 --name sparqlprog_pengines cmungall/sparqlprog
and then using it from python
In [1]: from pengines.Builder import PengineBuilder
...: from pengines.Pengine import Pengine
...: q = "member(X, [1,2,3])"
...: factory = PengineBuilder(urlserver="http://localhost:4242", destroy=False, ask=q)
...: pengine = Pengine(builder=factory, debug=False)
...: results = pengine.currentQuery.availProofs
...: print(results)
[{'X': 1}, {'X': 2}, {'X': 3}]
Hello,
I am trying to understand how to work with
pengines
. I have opened up an issue in theswi-prolog
forum but got no attention there yet:https://swi-prolog.discourse.group/t/pengines-issue/1838
That I am reproducing here below:
I’m using: SWI-Prolog version 8.0.3, via pengines on docker
the server is up and running
I want the code to: reproduce the example at https://github.com/ian-andrich/PythonPengines
by using these commands in python:
I am not getting anything back and I do not understand if this is a prolog issue or a python issue.
By the way, I also get an empty list by trying the query
Any advice, please?
Thanks
Andrea