Skip to content

Error handling errors #334

@stomir

Description

@stomir

Throwing an error while getting a model (in my case it's a timeout exception) results in an error like this:

File ".../python3.9/site-packages/clingo/solving.py", line 479, in model
    _handle_error(
File ".../python3.9/site-packages/clingo/_internal.py", line 60, in _handle_error
    if code == _lib.clingo_error_unknown and handler is not None and handler.error is not None:
AttributeError: '_SolveEventHandler' object has no attribute 'error'

My guess is that in Control.solve you're supposed to pass a _CBData object as a handler to SolveHandle, but you're passing a _SolveEventHandler.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions