Skip to main content
Version: 14

viktor.errors

Error

exception viktor.errors.Error

Bases: Exception

EntityError

exception viktor.errors.EntityError

Bases: Error

Base class exception for all entity errors raised in the API.

EntityCreateError

exception viktor.errors.EntityCreateError

Bases: EntityError

Exception raised if creation of an entity failed.

EntityDeleteError

exception viktor.errors.EntityDeleteError

Bases: EntityError

Exception raised if deletion of an entity failed.

EntityNotFoundError

exception viktor.errors.EntityNotFoundError

Bases: EntityError

Exception raised if an entity is requested using the api module but does not exist.

EntityReviseError

exception viktor.errors.EntityReviseError

Bases: EntityError

Exception raised if creating a revision (e.g. set params, rename) of an entity failed.

ExecutionError

exception viktor.errors.ExecutionError

Bases: Error

Exception raised if an error occurs during the execution of an external analysis.

GEFClassificationError

exception viktor.errors.GEFClassificationError

Bases: Exception

Exception raised if an error occurs during classification of viktor.geo.GEFData.

GEFParsingError

exception viktor.errors.GEFParsingError

Bases: Exception

Exception raised if an error occurs during parsing of a viktor.geo.GEFFile.

InternalError

exception viktor.errors.InternalError

Bases: Error

Exception applicable for incorrect internal VIKTOR logic. Please contact VIKTOR.

InputViolation

class viktor.errors.InputViolation(message, fields)

New in v13.7.0

Annotate fields that should be marked as invalid in the interface, along with a message.

Example:

InputViolation("Width cannot be larger than height", fields=['width', 'height'])
Parameters
  • message (str) – Message that is shown to the user.

  • fields (Sequence[str]) – Fields that are marked invalid in the interface. Note that these refer to the parametrization class attributes (e.g. ‘step_1.field_x’), and not the database location in case name is set.

LicenseError

exception viktor.errors.LicenseError

Bases: Error

Exception raised if an external analysis cannot be executed due to license issues.

ModelError

exception viktor.errors.ModelError

Bases: Error

Exception raised if an error occurs within the model of one of the bindings (e.g. SCIA, D-Settlement, …).

ParsingError

exception viktor.errors.ParsingError

Bases: Error

Exception raised if an error occurs during parsing.

SciaParsingError

exception viktor.errors.SciaParsingError

Bases: Exception

Exception raised if an error occurs during parsing of SCIA output results.

SpreadsheetError

exception viktor.errors.SpreadsheetError

Bases: Exception

Exception raised if an error occurs in the Excel or Spreadsheet service.

SummaryError

exception viktor.errors.SummaryError

Bases: Exception

Exception raised if an error occurs during the generation of the summary.

UserError

exception viktor.errors.UserError(*messages, input_violations=None)

Bases: Exception

New in v13.7.0

Exception that is shown to the user in the web-interface.

Example:

raise UserError("The design is not feasible")

By providing input_violations you can mark specific fields as invalid:

violations = [
    InputViolation("Width cannot be larger than height", fields=['width', 'height']),
    InputViolation(...),
]
raise UserError("The design is not feasible", input_violations=violations)
Parameters
  • messages (Any) – Messages to be shown to the user.

  • input_violations (Sequence[InputViolation]) – Mark fields invalid in the interface, along with a message.

ViewError

exception viktor.errors.ViewError

Bases: Exception

Exception raised if an error occurs during the generation of a view.

WordFileError

exception viktor.errors.WordFileError

Bases: Exception

Exception raised if an error occurs during rendering of a Word file.