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
I'm trying to generate explanations on a file which includes an embedded python script and receive the error message "RuntimeError: :1:1-8:6: error: python support not available"
A sample program is below - although it may not realistically produce something interesting - it should reproduce the error.
`#script (python)
import clingo
import datetime
N = clingo.Number
def year(atomDate):
date = datetime.datetime.strptime(atomDate.string, '%Y-%m-%d')
return N(date.year)
#end.
First, clingo 5.6 onwards is not supported yet. Although, it will come soon.
Please consider installing clingo 5.5.something in a separate environment to run xclingo properly for now.
Second, the support for embedded scripts hasn't been explored yet.
I will reopen this issue as a TODO for the future.
Hello!
I'm trying to generate explanations on a file which includes an embedded python script and receive the error message "RuntimeError: :1:1-8:6: error: python support not available"
A sample program is below - although it may not realistically produce something interesting - it should reproduce the error.
`#script (python)
import clingo
import datetime
N = clingo.Number
def year(atomDate):
date = datetime.datetime.strptime(atomDate.string, '%Y-%m-%d')
return N(date.year)
#end.
dateAsString("2024-01-01").
year(X, @year(X)) :- dateAsString(X).
%!show_trace year(X, Y).`
Versions:
xclingo --version
xclingo 2.0b14
clingo --version
clingo version 5.6.2
Address model: 64-bit
libclingo version 5.6.2
Configuration: with Python 3.10.6, without Lua
libclasp version 3.3.9 (libpotassco version 1.1.0)
Configuration: WITH_THREADS=1
Thanks so much!
The text was updated successfully, but these errors were encountered: