potassco / clinguin

🐧 Clingo Interactive UI
MIT License
25 stars 5 forks source link

Error in angular/graph_coloring example #161

Closed rtaupe closed 7 months ago

rtaupe commented 9 months ago

When running clinguin client-server --domain-files examples/angular/graph_coloring/encoding.lp examples/angular/graph_coloring/instance.lp --ui-files examples/angular/graph_coloring/ui.lp --backend=ClingraphBackend --clingraph-files=examples/angular/graph_coloring/viz.lp as suggested in https://github.com/potassco/clinguin/blob/master/examples/angular/graph_coloring/README.md, I get the following error:

File "C:\Python310\lib\site-packages\clinguin\server\presentation\endpoints.py", line 68, in standard_executor json = self._backend.get() File "C:\Python310\lib\site-packages\clinguin\server\application\backends\clingo_backend.py", line 437, in get self._update_ui_state() File "C:\Python310\lib\site-packages\clinguin\server\application\backends\clingraph_backend.py", line 206, in _update_ui_state graphs = self._compute_clingraph_graphs(domain_state) File "C:\Python310\lib\site-packages\clinguin\server\application\backends\clingraph_backend.py", line 239, in _compute_clingraph_graphs ctl.ground([("base", [])], ClingraphContext()) File "C:\Python310\lib\site-packages\clingo\control.py", line 484, in ground _handle_error( File "C:\Python310\lib\site-packages\clingo_internal.py", line 71, in _handle_error raise handler.error0.with_traceback(handler.error[2]) File "C:\Python310\lib\site-packages\clingo\control.py", line 151, in _pyclingo_ground_callback fun = getattr(sys.modules["main"] if context is None else context, py_name) File "C:\Python310\lib\site-packages\clingraph-1.1.0-py3.10.egg\clingraph\clingo_utils.py", line 138, in getattr return getattr(main, name) AttributeError: module 'main' has no attribute 'color'

rtaupe commented 9 months ago

The same happens also with the other examples with ClingraphBackend.

susuhahnml commented 7 months ago

Hi @rtaupe sorry for taking so long to get back to you. This needs an update in clingraph, just make sure you have the latest version and that should fix the issue.

rtaupe commented 7 months ago

Thanks!