-
Notifications
You must be signed in to change notification settings - Fork 98
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
Latest version doesn't seem to work in Windows with Python 2.7 #40
Comments
Can you paste a sample program that produces this issue? |
The code I posted on this thread should do the job: |
It's best to paste the smallest code that reproduces the issue. Can you run this in your python console and paste the result?
|
Don't have access to my work PC where I had installed from the command line above. Just tried at home (after same error) and got But am not 100% sure of the installation method I used for that. |
The error is from the inconsistency between 64 bit and 32 bit systems and their use of int or long. To avoid the error stick to 32 bit or 64 bit across your python and prolog installation. At least that is what resolved the error for me |
I met the same problem, but when I make the path of the pl file shorter, it won't have any problems |
Closing the issue since @pattoM's solution seems reasonable. |
If I install from an old (2012) installer, I can run a simple test program with Python 2.7. However, if I remove that and install the most recent from the console using
python -m pip install pyswip
...the package seems to be put in place correctly but the program no longer runs:
File "C:\Python27\lib\site-packages\pyswip\prolog.py", line 111, in call
t = getTerm(swipl_list)
File "C:\Python27\lib\site-packages\pyswip\easy.py", line 404, in getTerm
res = getList(t)
File "C:\Python27\lib\site-packages\pyswip\easy.py", line 420, in getList
result.append(getTerm(head))
File "C:\Python27\lib\site-packages\pyswip\easy.py", line 406, in getTerm
res = getFunctor(t)
File "C:\Python27\lib\site-packages\pyswip\easy.py", line 429, in getFunctor
return Functor.fromTerm(t)
File "C:\Python27\lib\site-packages\pyswip\easy.py", line 241, in fromTerm
raise ArgumentTypeError((str(Term), str(int)), str(type(term)))
pyswip.easy.ArgumentTypeError: Expected an argument of type '("<class 'pyswip.easy.Term'>", "<type 'int'>")' but got '<type 'long'>'
Did I somehow bugger things up by leaving something in place from the original install? (If I switch again by removing the newer version and then executing the old installer again, it works.)
EDIT: Repro'd the same problem on a different machine, this time without having initially used the installer exe.
The text was updated successfully, but these errors were encountered: