Exceptions¶
All custom exception classes raised by idfkit.
Custom exceptions for idfkit.
DanglingReferenceError
¶
Bases: IdfKitError
Raised when an object references a non-existent object.
Source code in src/idfkit/exceptions.py
DuplicateObjectError
¶
Bases: IdfKitError
Raised when attempting to add an object with a duplicate name.
Source code in src/idfkit/exceptions.py
EnergyPlusNotFoundError
¶
Bases: IdfKitError
Raised when EnergyPlus installation cannot be found.
Source code in src/idfkit/exceptions.py
ExpandObjectsError
¶
Bases: IdfKitError
Raised when an EnergyPlus preprocessor fails.
Attributes:
| Name | Type | Description |
|---|---|---|
preprocessor |
Name of the preprocessor that failed (e.g.
|
|
exit_code |
Process exit code ( |
|
stderr |
Captured standard error output (truncated to 500 chars). |
Source code in src/idfkit/exceptions.py
IDFParseError
¶
Bases: IdfKitError
Raised when parsing IDF/epJSON content fails.
Source code in src/idfkit/exceptions.py
IdfKitError
¶
InvalidFieldError
¶
Bases: IdfKitError, AttributeError
Raised when an invalid field is accessed or set.
Inherits from AttributeError so that Python's attribute access
protocol (hasattr, getattr with default) continues to work
correctly when this is raised from __getattr__.
Source code in src/idfkit/exceptions.py
NoDesignDaysError
¶
Bases: IdfKitError
Raised when a DDY file contains no SizingPeriod:DesignDay objects.
This typically occurs for weather stations that lack ASHRAE design conditions data in the climate.onebuilding.org database.
Attributes:
| Name | Type | Description |
|---|---|---|
station_name |
Display name of the station (if available). |
|
ddy_path |
Path to the DDY file that was parsed. |
|
nearby_suggestions |
List of nearby stations that may have design days. |
Source code in src/idfkit/exceptions.py
ParseDiagnostic
dataclass
¶
Structured parse diagnostic with best-effort source context.
Source code in src/idfkit/exceptions.py
RangeError
¶
Bases: IdfKitError
Raised when a field value is outside the valid range (eppy compatibility).
Attributes:
| Name | Type | Description |
|---|---|---|
obj_type |
The object type. |
|
obj_name |
The object name. |
|
field_name |
The field that failed range checking. |
Source code in src/idfkit/exceptions.py
SchemaNotFoundError
¶
Bases: IdfKitError
Raised when the EpJSON schema file cannot be found.
Source code in src/idfkit/exceptions.py
SimulationError
¶
Bases: IdfKitError
Raised when an EnergyPlus simulation fails.
Source code in src/idfkit/exceptions.py
UnknownObjectTypeError
¶
Bases: IdfKitError, KeyError
Raised when an unknown object type is encountered.
Inherits from KeyError so that existing code catching KeyError
for missing object types continues to work.
Source code in src/idfkit/exceptions.py
UnsupportedVersionError
¶
Bases: IdfKitError
Raised when a non-existent EnergyPlus version is requested.
Attributes:
| Name | Type | Description |
|---|---|---|
version |
The requested version tuple. |
|
supported_versions |
Tuple of all supported version tuples. |
Source code in src/idfkit/exceptions.py
ValidationFailedError
¶
Bases: IdfKitError
Raised when validation fails.
Source code in src/idfkit/exceptions.py
VersionNotFoundError
¶
Bases: IdfKitError
Raised when version cannot be detected from file.