Skip to content
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

embedded script - error: python support not available #13

Open
jcouk opened this issue Jan 26, 2024 · 1 comment
Open

embedded script - error: python support not available #13

jcouk opened this issue Jan 26, 2024 · 1 comment

Comments

@jcouk
Copy link

jcouk commented Jan 26, 2024

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!

@jcouk jcouk closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@bramucas
Copy link
Owner

Hi, sorry for the late response.

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.

Thank you for opening the issue!

@bramucas bramucas reopened this Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants