You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use BooleanExpression.from_dimacs_file the optional dependency checker isn't correctly detecting that tweedledum isn't installed. This causes the wrong exception to be raised when the constructor tries to import tweedledum.
This should raise a MissingOptionalLibraryError instead of a ModuleNotFoundError
Any suggestions?
This seems to be coming from #9754 which changed the optional library check from a module level thing to using the decorator form with require_in_instance. I think the require_in_instance decorator doesn't know how to wrap classmethod constructors and is only work with __init__. The easiest way to fix this is probably to just add an explicit call to check before we import in the class method constructor.
The text was updated successfully, but these errors were encountered:
Environment
What is happening?
When trying to use
BooleanExpression.from_dimacs_file
the optional dependency checker isn't correctly detecting that tweedledum isn't installed. This causes the wrong exception to be raised when the constructor tries to import tweedledum.How can we reproduce the issue?
What should happen?
This should raise a
MissingOptionalLibraryError
instead of aModuleNotFoundError
Any suggestions?
This seems to be coming from #9754 which changed the optional library check from a module level thing to using the decorator form with
require_in_instance
. I think therequire_in_instance
decorator doesn't know how to wrap classmethod constructors and is only work with__init__
. The easiest way to fix this is probably to just add an explicit call to check before we import in the class method constructor.The text was updated successfully, but these errors were encountered: