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

Control.py broken? #323

Closed
ZimneJonas opened this issue Jul 17, 2021 · 7 comments
Closed

Control.py broken? #323

ZimneJonas opened this issue Jul 17, 2021 · 7 comments

Comments

@ZimneJonas
Copy link

I seem to have problems with control.py.
I expect to have done some mistake while installing.

  1. This is an Error i get for running something like 'ctl.ground([("step",[42])])' in the python API:

File "/home/zimne/anaconda3/envs/tel/lib/python3.9/site-packages/clingo/control.py", line 335, in ground
c_part.params[i] = sym._rep
AttributeError: 'int' object has no attribute '_rep'

  1. And this is an error if I am running the Asprilo Visualizer:

File "/home/zimne/anaconda3/envs/tel/lib/python3.9/site-packages/visualizer-0.2.2-py3.7.egg/visualizer/parser.py", line 206, in parse
AttributeError: 'Control' object has no attribute 'builder'

@ZimneJonas
Copy link
Author

*The same programs do run on 5.4 though

@MaxOstrowski
Copy link
Member

MaxOstrowski commented Jul 18, 2021 via email

@ZimneJonas
Copy link
Author

Thank you, that works.
If you look at the "How to build your own ASP-based system ?!" section 4 (pp.24-27). Schaub/Romero et. al.
https://www.cs.uni-potsdam.de/wv/publications/DBLP_journals/corr/abs-2008-06692.pdf
The examples do not run either on 5.5.1 nor 5.4 as far as I tested (for different reasons).
5.5.1 has the the different Control class.
5.4 has no accessible Aplication class

Making the new clingo versions not backwards compatible, seems bad for educational papers like this.
As well as for programs like the asprilo visualizer.

However, if this is necessary it is no longer a problem.

@tortinator
Copy link
Member

Hi @ZimneJonas ! Thanks for pointing this out to us! In fact, the paper at archive will ultimately align with 5.5 (have you checked the recent version ?), once it is published. We just pre-published its preliminary version that only ran with an intermediate version. Sorry for any inconvenience!

@rkaminsk
Copy link
Member

I am going to open an issue for the asprilo visualizer.

@NikoRW
Copy link

NikoRW commented Oct 10, 2023

Hi, I tried to run the examples published in 'Multi-shot ASP solving with clingo' section 5.1, Listing 5, 6 and 7 https://arxiv.org/abs/1705.09811 and encountered the same error as Jonas. I followed the advice to wrap the parameters inside the number method and now I'm getting :
File "/home/niko/anaconda3/lib/python3.9/site-packages/clingo/symbol.py", line 248, in Number
_lib.clingo_symbol_create_number(number, p_rep)
TypeError: an integer is required
Did I make a mistake or is there also an updated version for this paper?

@rkaminsk
Copy link
Member

Please do not comment on long closed issues and rather use a new one. Please open a new one and also show us the code you are trying to run.

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

5 participants