ENKeyError#

module wntr.epanet.exceptions

exception ENKeyError[source]#

Bases: EpanetException, KeyError

__init__(code, name, *args, line_num=None, line=None)[source]#

An EPANET exception class that also subclasses KeyError.

Parameters:
  • code (int) – The EPANET error code

  • name (str) – The key/name/id that is missing

  • args (additional non-keyword arguments, optional) – If there is a string-format within the error code’s text, these will be used to replace the format, otherwise they will be output at the end of the Exception message.

  • line_num (int, optional) – The line number, if reading an INP file, by default None

  • line (str, optional) – The contents of the line, by default None

__new__(**kwargs)#