error¶
Draftsman errors. Used to enforce “Factorio-safety”.
- exception DataFormatError¶
Issued when a value passed in to a method or attribute violates the required structure for that data, such that it violates “Factorio-correctness”.
- exception DraftsmanError¶
Default error for
draftsman. Issued when some behavior directly conflicts with the module’s function.
- exception DuplicateIDError¶
Raised when two EntityLike’s are added to a
Collectionwith the same ID, which is disallowed.
- exception EntityNotCircuitConnectableError¶
Raised when a circuit connection is attempted between an entity or entities that cannot be connected with circuit wires.
- exception EntityNotPowerConnectableError¶
Raised when a power connection is attempted between an entity or entities that cannot be connected with power wires.
- exception FlippingError¶
Raised when attempting to flip a
Collectionthat contains entities that cannot be flipped.
- exception IncompatableModError¶
Raised when two mods in the
factorio-modsfolder specify the other as incompatible.
- exception IncompleteSignalError¶
Raised when a constructing a SignalID from a string name when the name is not recognized by the current environment. In this case, the type is ambiguous, and so must be either defined alongside the name at instantiation or the environment must be updated to accomodate the unknown signal.
- exception IncorrectBlueprintTypeError¶
Raised when attempting to construct a
Blueprintobject without the"blueprint"key or aBlueprintBookwithout the"blueprint_book"key in their root trees. Most commonly issued when trying to create aBlueprintwith aBlueprintBookstring, and vice-versa.
- exception IncorrectModFormatError¶
Raised when the format of a loaded mod conflicts with expectations.
- exception IncorrectModVersionError¶
Raised when a loaded mod’s version is incompatible with the version of Factorio or the versions of other mods.
- exception InvalidAssociationError¶
Raised when an Association to an Entity still persists even when the Entity that it refers to has been deleted, or when attempting to create an Association between entities that don’t exist within the
Collectionthey should.
- exception InvalidConnectionSideError¶
Raised when a circuit connection is connected to a side other than
1or2.
- exception InvalidEntityError¶
Raised when an Entity’s name is not one of the
similar_entitiesfor it’s child type, or when it is not any valid entry indraftsman.data.entities.raw.
- exception InvalidFluidError¶
Raised when a
InfinityPipe’s fluid is set to anything other than a valid entry indraftsman.data.signals.fluid.
- exception InvalidInstrumentID¶
Raised when setting a
ProgrammableSpeaker’s instrument to a number that exceeds it’s instrument count, or a string that is not the name of any of it’s instruments.
- exception InvalidItemError¶
Raised when an item name does not match any valid entry in
draftsman.data.items.raw.
- exception InvalidMapperError¶
Raised when a mapper name does not match any valid entry currently recognized by Draftsman.
- exception InvalidModeError¶
Raised when a string mode doesn’t match any valid value for that particular method.
- exception InvalidModuleError¶
Raised when an input module name is not an entry in
draftsman.data.modules.raw
- exception InvalidNoteID¶
Raised when setting a
ProgrammableSpeaker’s note to a number that exceeds the number of notes in it’s selected instrument, or a string that is not the name of any of the notes created by the current instrument.
- exception InvalidOperationError¶
Raised whan a condition is set to have an unrecognized operation for that particular case.
- exception InvalidRecipeError¶
Raised when an input recipe name is not an entry in
draftsman.data.recipes.raw.
- exception InvalidSideError¶
Raised when a Splitter’s input or output priority is set to something other than
"left"or"right".
- exception InvalidSignalError¶
Raised when a signal name does not match any valid entry currently recognized by Draftsman.
- exception InvalidTileError¶
Raised when creating a
Tilewith, or changing it’s name to, anything other than a valid tile name.
- exception InvalidWireTypeError¶
Raised when either a circuit wire is not either
"red"or"green"or when a power wire connection type is not either"Cu0"or"Cu1".
- exception MalformedBlueprintStringError¶
Raised when a blueprint string cannot be resolved due to an error with the zlib or base64 decompression. This usually means that the string is either missing characters or has been encoded improperly.
- exception MissingModError¶
Raised when a mod depends on another to function, but the desired mod is not in the
factorio-modsfolder.
- exception RotationError¶
Raised when a rotation angle has been chosen that does not align with the possible rotations that the
Collectioncan have, such as rotations by 45 degrees.