Module “exceptions”

exception tc_python.exceptions.APIServerException

Bases: GeneralException

An exception that occurred during the communication with the API-server. It is normally not related to an error in the user program.

exception tc_python.exceptions.CalculationException

Bases: TCException

An exception that occurred during a calculation.

exception tc_python.exceptions.ComponentNotExistingException

Bases: GeneralException

The selected component is not existing.

exception tc_python.exceptions.DatabaseException

Bases: CalculationException

Error loading a thermodynamic or kinetic database, typically due to a misspelled database name or a database missing in the system.

exception tc_python.exceptions.DegreesOfFreedomNotZeroException

Bases: CalculationException

The degrees of freedom in the system are not zero, i.e. not all required conditions have been defined. Please check the conditions given in the exception message.

exception tc_python.exceptions.EquilibriumException

Bases: CalculationException

An equilibrium calculation has failed, this might happen due to inappropriate conditions or a very difficult problem that can not be solved.

exception tc_python.exceptions.GeneralCalculationException

Bases: CalculationException

General error occurring while a calculation is performed.

exception tc_python.exceptions.GeneralException

Bases: TCException

A general exception that might occur in different situations.

exception tc_python.exceptions.InvalidCalculationConfigurationException

Bases: CalculationException

Thrown when errors are detected in the configuration of the calculation.

exception tc_python.exceptions.InvalidCalculationStateException

Bases: CalculationException

Trying to access an invalid calculation object that was invalidated by calling invalidate on it.

exception tc_python.exceptions.InvalidNumberOfResultGroupsException

Bases: ResultException

A calculation result contains several result groups, which is not supported for the used method.

exception tc_python.exceptions.InvalidResultConfigurationException

Bases: ResultException

A calculation result configuration is invalid.

exception tc_python.exceptions.InvalidResultStateException

Bases: CalculationException

Trying to access an invalid result (for example a SingleEquilibriumTempResult object that got already invalidated by condition changes or a result that was invalidated by calling invalidate on it).

exception tc_python.exceptions.LicenseException

Bases: GeneralException

No valid license for the API or any Thermo-Calc product used by it found.

exception tc_python.exceptions.NoDataForPhaseException

Bases: ResultException

There is no result data available for a selected phase.

exception tc_python.exceptions.NotAllowedOperationException

Bases: CalculationException

The called method or operation is not allowed in the current mode of operation (i.e. debug or production mode). Production mode means that the Property Model is only present as an *.py.encrypted-file, while in debug mode it is available as *.py-file. Certain methods for obtaining internal model parameters are not available for encrypted models.

exception tc_python.exceptions.PhaseNotExistingException

Bases: GeneralException

The selected phase is not existing, so no data can be provided for it.

exception tc_python.exceptions.ResultException

Bases: TCException

An exception that occurred during the configuration of a calculation result.

exception tc_python.exceptions.SyntaxException

Bases: CalculationException

Syntax error in a Console Mode expression.

exception tc_python.exceptions.TCException

Bases: Exception

The root exception of TC-Python.

exception tc_python.exceptions.UnrecoverableCalculationException

Bases: CalculationException

The calculation reached a state where no further actions are possible, this happens most often due to a FORTRAN- hard crash in the API server backend.

Note

It is possible to catch that exception outside of the with-clause context and to continue by setting up a new context (i.e. by a new with TCPython() as session).

tc_python.exceptions.handle_exception(e)