errors

Exceptions

ApplicationError

An exception used when an external application generates an error.

DeferredImportError

This exception is raised when something attempts to access a module that was imported by attempt_import(), but the module import failed.

DeveloperError(*args)

Exception class used to throw errors that result from Pyomo programming errors, rather than user modeling errors (e.g., a component not declaring a 'ctype').

InfeasibleConstraintException(*args)

Exception raised by Pyomo transformations or solver interfaces to indicate that an infeasible constraint has been identified (e.g. in the course of range reduction).

IntervalException(*args)

Exception class used for errors in interval arithmetic.

InvalidConstraintError(*args)

Exception raised for constraints that cannot be represented or emitted.

InvalidExpressionError(*args)

Exception raised for expressions that cannot be represented or emitted.

InvalidValueError(*args)

Exception class used for value errors in compiled model representations

IterationLimitError(*args)

A subclass of RuntimeError, raised by an iterative method when the iteration limit is reached.

MouseTrap(*args)

Exception class used to throw errors for not-implemented functionality that might be rational to support (i.e., we already gave you a cookie) but risks taking Pyomo's flexibility a step beyond what is sane, or solvable, or communicable to a solver, etc.

NondifferentiableError(*args)

A Pyomo-specific ValueError raised for non-differentiable expressions

PyomoException(*args)

General base class for Pyomo exceptions.

TempfileContextError(*args)

A Pyomo-specific IndexError raised when attempting to use the TempfileManager when it does not have a currently active context.

TemplateExpressionError(template, *args, **kwds)

Special ValueError raised by getitem for template arguments

Functions

format_exception(msg[, prolog, epilog, ...])

Generate a formatted exception message