You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python3 pyswip_string.py
Traceback (most recent call last):
File "pyswip_string.py", line 23, in <module>
print(list(p.query('some_string_fact(S)')))
File "/usr/lib/python3.5/site-packages/pyswip/prolog.py", line 111, in __call__
t = getTerm(swipl_list)
File "/usr/lib/python3.5/site-packages/pyswip/easy.py", line 404, in getTerm
res = getList(t)
File "/usr/lib/python3.5/site-packages/pyswip/easy.py", line 420, in getList
result.append(getTerm(head))
File "/usr/lib/python3.5/site-packages/pyswip/easy.py", line 406, in getTerm
res = getFunctor(t)
File "/usr/lib/python3.5/site-packages/pyswip/easy.py", line 429, in getFunctor
return Functor.fromTerm(t)
File "/usr/lib/python3.5/site-packages/pyswip/easy.py", line 252, in fromTerm
args.append(getTerm(a0 + i))
File "/usr/lib/python3.5/site-packages/pyswip/easy.py", line 402, in getTerm
res = _getterm_router[p](t)
File "/usr/lib/python3.5/site-packages/pyswip/easy.py", line 387, in getString
if PL_get_string_chars(t, byref(s), byref(slen)):
File "/usr/lib/python3.5/site-packages/pyswip/core.py", line 555, in check_and_call
args[i] = list_to_bytes_list(arg)
File "/usr/lib/python3.5/site-packages/pyswip/core.py", line 487, in list_to_bytes_list
pList = c_char_p * len(strList)
TypeError: object of type 'CArgObject' has no len()
Expected result: No error, but the unification [{'S': "abc"}]
I'm using SWI-Prolog 7.2.3 on Fedora 25 with pyswip commit 72771d9.
The text was updated successfully, but these errors were encountered:
When using Prolog strings in a fact, an error is thrown.
This results in an error:
Expected result: No error, but the unification
[{'S': "abc"}]
I'm using SWI-Prolog 7.2.3 on Fedora 25 with pyswip commit 72771d9.
The text was updated successfully, but these errors were encountered: