Closed AmrSol closed 1 month ago
It seems like this thread could be of great use to the problem:
Thanks @AmrSol ! The problem will be fixed with PR: #145.
Hey @crgz . I see that PR: #145 has been merged. Consequently, I did the following:
It finally works! The thread suggested above was very useful. Here is how:
For some reason downloading SWI-Prolog 8.4.3 from the website is causing me another slew of errors. Therefore I went back to SWI-Prolog 9.x via homebrew.
By implementing D.Cox’s pyswip PR #133, I get the “Exception: swi-prolog version number could not be determined”.
Then I implemented @hakank 's suggestion by amending Cox’s “PL_version = _lib.PL_version” to “PL_version = _lib.PL_version_info”
Viola! Thankfully, it works! In case anyone is curious, I have been using Aleph.
Hello 👋 I've run into the same problem. @AmrSol's solution above is working for me for the moment. Thanks!
Hey @crgz . I see that PR: #145 has been merged. Consequently, I did the following:
* "pip uninstall pyswip" * "pip install git+https://github.com/yuce/pyswip@master#egg=pyswip" and got the latest version. Unfortunately, I get the same error as above...
Works for me!
But - I would assume that instantiating a new Prolog object will start a fresh and empty database. Instead asserts are piling up.
I updated my brew formulas including swi-prolog (from 8.4.x to 9.0.0) and my codebase no longer works. I get this error:
File "/Users/amrsoliman/miniforge3/envs/M1/lib/python3.9/site-packages/pyswip/prolog.py", line 156, in consult next(cls.query(filename.join(["consult('", "')"]), catcherrors=catcherrors)) File "/Users/amrsoliman/miniforge3/envs/M1/lib/python3.9/site-packages/pyswip/prolog.py", line 126, in call raise PrologError("".join(["Caused by: '", query, "'. ", pyswip.prolog.PrologError: Caused by: 'consult('train.pl')'. Returned: 'error(instantiation_error, context(:(system, /(atom_chars, 2)), _3208))'.
Is there some sort of incompatibility between pyswip and swi-prolog 9.0.0?