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

Not executable at all ("AttributeError") #14

Open
guestieng opened this issue Feb 16, 2024 · 4 comments
Open

Not executable at all ("AttributeError") #14

guestieng opened this issue Feb 16, 2024 · 4 comments

Comments

@guestieng
Copy link

Unfortunately, xclingo appears to be not executable at all:

'''

PS> .<xclingo path>\xclingo.exe -n 0 0 .<xclingo root>\examples\dont_drive_drunk.lp
xclingo version 2.0b18
Reading from .<xclingo root>\examples\dont_drive_drunk.lp
Traceback (most recent call last):
File "<frozen runpy>", line 198, in run_module_as_main
File "<frozen runpy>", line 88, in run_code
File "<python root>\Scripts\xclingo.exe_main
.py", line 7, in
File "<python root>\Lib\site-packages\xclingo_main
.py", line 191, in main
ground_solve_explain(args, unknown_args, programs)
File "<python root>\Lib\site-packages\xclingo_main_.py", line 153, in ground_solve_explain
xclingo_control = init_xclingo_control(args, unknown_args, programs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<python root>\Lib\site-packages\xclingo_main
.py", line 50, in _init_xclingo_control
xclingo_control.add("base", [], program)
File "<python root>\Lib\site-packages\xclingo_main.py", line 72, in add
name, parameters, self.pre_explaining_pipeline.translate(name, program)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<python root>\Lib\site-packages\xclingo\preprocessor_pipeline.py", line 20, in translate
translation = p.process_program(translation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<python root>\Lib\site-packages\xclingo\preprocessor_preprocessor.py", line 64, in process_program
parse_string(
File "<python root>\Lib\site-packages\clingo\ast.py", line 1322, in parse_string
_handle_error(
File "<python root>\Lib\site-packages\clingo_internal.py", line 71, in _handle_error
raise handler.error0.with_traceback(handler.error[2])
File "<python root>\Lib\site-packages\clingo\ast.py", line 1210, in _pyclingo_ast_callback
callback(AST(ast))
File "<python root>\Lib\site-packages\xclingo\preprocessor_preprocessor.py", line 66, in
lambda ast: self._add_to_translation(self.preprocess_rule(ast)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<python root>\Lib\site-packages\xclingo\preprocessor_preprocessor.py", line 45, in _add_to_translation
for ra in rule_asts:
File "<python root>\Lib\site-packages\xclingo\preprocessor_preprocessor.py", line 264, in preprocess_rule
for r in self.translate_rule(rule_id, 0, rule_ast.head, rule_ast.body):
File "<python root>\Lib\site-packages\xclingo\preprocessor_preprocessor.py", line 200, in translate_rule
for translated_rule in self._support_translator.translate(
File "<python root>\Lib\site-packages\xclingo\preprocessor_translator.py", line 87, in translate
yield self._rule(
^^^^^^^^^^^
File "<python root>\Lib\site-packages\xclingo\preprocessor\xclingo_ast_xclingo_ast.py", line 137, in init
super().init(**kwargs)
File "<python root>\Lib\site-packages\xclingo\preprocessor\xclingo_ast_xclingo_ast.py", line 111, in init
super().init(**kwargs)
File "<python root>\Lib\site-packages\xclingo\preprocessor\xclingo_ast_xclingo_ast.py", line 89, in init
super().init(func_name=_SUP_HEAD, **kwargs)
File "<python root>\Lib\site-packages\xclingo\preprocessor\xclingo_ast_xclingo_ast.py", line 80, in init
[rule_id, disjunction_id, head, list(collect_free_vars(body))],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<python root>\Lib\site-packages\xclingo\preprocessor\xclingo_ast_ast_shortcuts.py", line 123, in collect_free_vars
if lit.atom.left.ast_type == ASTType.Variable:
^^^^^^^^^^^^^
File "<python root>\Lib\site-packages\clingo\ast.py", line 970, in getattr
raise AttributeError(f"no attribute: {name}")
AttributeError: no attribute: left
'''

@bramucas
Copy link
Owner

Hello @guestieng.

Xclingo it is not compatible with clingo >=5.6 versions.

Please install clingo 5.5.something.

@bramucas
Copy link
Owner

Compatibility with 5.6 will come soon

@guestieng
Copy link
Author

Ah, ok, thanks.
Good to know.
Looking forward to 5.6 support.

@bramucas
Copy link
Owner

Yes! I'll reach you here when it is ready.
Let me know if you have another problem.
And thanks for supporting xclingo!

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