Problem codes: Submodels and libraries¶
Submodel definitions and instances, asset libraries and catalogues. The list is generated from the codes' own table; the meaning is the table's sentence for the code.
| Code | Severity | Meaning | About |
|---|---|---|---|
E_ASSET_3D |
error | A block's asset_3d is not "library/asset": lower-case letters, digits and underscores on each side of one slash. It only picks the 3D view's mesh. On screen: "Block {block}: the 3D asset {value} is not written library/asset" | -- |
E_ASSET_BLOCK_TYPE |
error | An asset uses a block type this build does not register (needs a plugin). | -- |
E_ASSET_CODE |
error | A library carries executable content (custom_logic, a plugin reference, Python). | -- |
E_ASSET_DEFINITION |
error | An asset's definition is invalid by the ordinary model validator. | -- |
E_ASSET_GEOMETRY |
error | An asset's "geometry" fragment is malformed, or a block inside it binds to a node the fragment does not declare. | -- |
E_ASSET_GRAPHIC |
error | A graphic names an unknown state, or its SVG is unsafe or over the size cap. | -- |
E_ASSET_ID |
error | An asset has an empty or duplicate id. | -- |
E_ASSET_MIGRATION |
error | An asset's "migrations" entry is malformed: a bad semver range, an unknown step, or a step naming a parameter this version lacks. | -- |
E_ASSET_PARAMETER |
error | A parameter's type, default, range or choices are inconsistent. | -- |
E_ASSET_REQUIRES |
error | An asset's required model-level records name an unknown section, or are malformed. | -- |
E_ASSET_TEST |
error | An asset test entry is malformed. | -- |
E_ASSET_TEST_FAILED |
error | An asset test's KPI is outside its tolerance. | -- |
E_ASSET_UNKNOWN_NAME |
error | A definition expression names something that is no parameter, variable or built-in (often a misspelt parameter). | -- |
E_CATALOGUE_COLUMN |
error | A catalogue row is missing a declared column, or a preset maps a column the catalogue does not declare. | -- |
E_CATALOGUE_VALUE |
error | A catalogue cell's type does not fit the parameter the preset maps it to. | -- |
E_DUPLICATE_SUBMODEL_PORT |
error | Two ports on the same side share a name. On screen: "{label}: two {side} ports are named {port}" | DUPLICATE, SUBMODEL, submodels |
E_EXTENDS_CYCLE |
error | A definition (or library asset) extends itself, directly or transitively . On screen: "Submodels extend each other in a loop: {loop}" | -- |
E_EXTENDS_UNKNOWN |
error | A definition's extends names no definition in the model (or an asset's, no asset of the same library). On screen: "Submodel {submodel} extends {parent}, which does not exist" |
-- |
E_LIBRARY_CATALOGUE |
error | A catalogue's shape is wrong: no name, no columns, a duplicate name, or a row that is not an object. | -- |
E_LIBRARY_FORMAT |
error | A library file is not an object, or its format_version is unknown. | -- |
E_LIBRARY_HEADER |
error | A library header field is missing or malformed (id, name, semver version). | -- |
E_LIBRARY_VERSION |
error | A library needs a newer schema version than this build supports. | -- |
E_SUBMODEL |
error | A submodel section problem reported while flattening. On screen: "A submodel could not be put together" / "Submodel {submodel}: its definition must be an object" / "A submodel link names a block that does not exist" | SUBMODEL, submodels |
E_SUBMODEL_ARGUMENTS |
error | A SUBMODEL instance's arguments are not an object. On screen: "Block {block}: submodel arguments must be an object" | SUBMODEL, submodels |
E_SUBMODEL_ARGUMENT_MISSING |
error | An instance omits a declared parameter that has no default. On screen: "Block {block}: missing argument {param} for submodel {submodel}" | SUBMODEL, submodels |
E_SUBMODEL_ARGUMENT_UNKNOWN |
error | An instance passes an argument the definition does not declare. On screen: "Block {block}: unknown argument {key} for submodel {submodel}" | SUBMODEL, submodels |
E_SUBMODEL_ARG_REFERENCE |
error | A refers_to argument names a record the model does not declare. On screen: "{block}: argument {name} names {value}, which is not defined" |
SUBMODEL, submodels |
E_SUBMODEL_ARG_TYPE |
error | A {"$arg": ...} value does not fit the type its target declares. On screen: "Repeat count: {arg} is {value}, not a whole number" / "{block}: {arg} is {value}, the wrong type" | SUBMODEL, submodels |
E_SUBMODEL_ARG_UNKNOWN |
error | A {"$arg": ...} names a parameter the definition does not declare. On screen: "Block {block}: parameter {parameter} used outside a submodel" / "Submodel {submodel}: {arg} is not one of its parameters" / "Repeat count uses {arg}, which is not a parameter" / "{block}: {arg} is not a parameter of this submodel" | SUBMODEL, submodels |
E_SUBMODEL_CYCLE |
error | A submodel definition instantiates itself, directly or transitively. On screen: "Submodel definitions loop: {loop}" | SUBMODEL, submodels |
E_SUBMODEL_DEAD_END |
error | A definition with no SUB_EXIT has a block that is not a DISPOSE dead end. On screen: "Submodel {submodel}: block {block} is a dead end" | DISPOSE, SUBMODEL, SUB_EXIT, submodels |
E_SUBMODEL_PORT_NAME |
error | A submodel port has no name. On screen: "{label}: a {side} port has no name" | SUBMODEL, submodels |
E_SUBMODEL_PORT_REQUIRED |
error | A link to/from an instance must name a port. On screen: "Link {link}: choose a {side} port; {submodel} has {n} {port_side} ports" | SUBMODEL, submodels |
E_SUBMODEL_PORT_UNKNOWN |
error | A link names a port the definition (or, with repeat groups, this instance) does not have. On screen: "Link {link}: submodel {submodel} has no {port_side} port {port}" / "Link {link}: submodel {submodel} has no {port_side} port {port}" | SUBMODEL, submodels |
E_SUBMODEL_REPEAT |
error | A definition's repeat group or {i} placeholder is malformed. On screen: "Submodel {submodel}: a repeat group is wrong" / "Block {block}: repeating only works inside a submodel" / "Failure {failure} needs a copy number in its name" | SUBMODEL, submodels |
E_SUBMODEL_REPEAT_COUNT |
error | A repeat count is not an int in 0..500, or an optional group's count is above 1. On screen: "Repeat count {raw} cannot be worked out" / "Repeat count {raw} is not a whole number" / "Repeat count {count} is outside 0 to {max}" / "Repeat group {index}: count {count} needs the copy number in block names" | SUBMODEL, submodels |
E_SUBMODEL_SCOPE |
error | SUB_ENTRY/SUB_EXIT used outside a submodel definition. On screen: "Block {block}: {kind} only works inside a submodel" | SUBMODEL, SUB_ENTRY, SUB_EXIT, submodels |
E_SUBMODEL_SCOPED_NAME |
error | A $name in a definition has no top-level template to clone. On screen: "Submodel {submodel}: {value} has no template at the top level" |
SUBMODEL, submodels |
E_UNKNOWN_SUBMODEL |
error | A SUBMODEL instance names a definition that does not exist. On screen: "Block {block}: unknown submodel {submodel}" | SUBMODEL, submodels |
W_LIBRARY_ITEM_CLASH |
warning | A required model-level record already exists under that name with different content; the model's own record is used. On screen: "The model's own {kind} {name} differs from the asset's" | -- |
W_LIBRARY_UPGRADE |
warning | A definition's library has a newer version installed. | -- |
How to fix¶
Each code with the usual remedy:
E_ASSET_BLOCK_TYPE: Replace the block'stypein the asset'sdefinition.blockswith a built-in block type, or install the plugin that registers it. Until then the asset stays unavailable.E_ASSET_CODE: Remove everycustom_logic,python,plugin,entry_pointorcodekey from the file, and replace any LOGIC block in adefinitionwith DECIDE and ASSIGN blocks. A library is data only.E_ASSET_DEFINITION: Give the asset adefinitionobject with ablockslist of block objects, then fix what the message names. The definition is checked like any submodel, so a bad link or parameter fails here.E_ASSET_GEOMETRY: Give each entry ingeometry.nodesa uniquenameand numericdxanddy, withattachtrue or false. Each segment'sfromandto, and every$nodea block binds, must name a declared node.E_ASSET_GRAPHIC: Fix the graphic the path names. Use only the statesidle,busy,down,offandblocked, includeidle, keep each SVG safe and small, write colours as#RRGGBB, and drawicononviewBox="0 0 24 24".E_ASSET_ID: Give every asset an object with a uniqueidmade of letters, digits,_,-or., starting with a letter or digit.E_ASSET_MIGRATION: Give eachmigrationsentry a semver range infrom, such as^1.2.0, and a non-emptystepslist. Each step is onerename_parameter,set_defaultorrename_recordnaming a parameter or record kind this version declares.E_ASSET_PARAMETER: Give each entry inparametersa unique identifiernameand a knowntype, with adefaultthat fits it. Achoiceneedschoicesholding the default, and a number must lie within numericminandmax.E_ASSET_REQUIRES: Makerequiresan object whose keys are model sections, such asresourcesorvariables, each a list of records with aname. Move any$argvalue into the definition'sscopedoverrides, because required records are copied as written.E_ASSET_TEST: Maketestsa list of objects, each with a non-emptyexpectlist. Every expectation needs a numericvalueand one ofkey,kpi,exitorresource, and everyrecordsprobe needs anameand anexpression.E_ASSET_UNKNOWN_NAME: Correct the name in the definition expression, or declare it in the asset'sparameters. A variable the surrounding model supplies goes inrequires.variables, or in a test'smodel.variables.E_CATALOGUE_COLUMN: Give every row in the catalogue'srowsa value for each name in itscolumns. In the asset'spreset.map, map only declared columns to parameters the asset declares inparameters.E_CATALOGUE_VALUE: Correct the catalogue cell so it fits the parameter thepreset.mapfills with it, for example a number within the parameter'sminandmax, or one of itschoices.E_DUPLICATE_SUBMODEL_PORT: Rename one of the twoSUB_ENTRYorSUB_EXITblocks'portvalues in the definition. Port names must be unique per side, so links can say which port they mean.E_EXTENDS_CYCLE: Change oneextendsin the loop the message shows so it names a definition outside the chain, or remove it. A definition cannot extend itself, directly or through another definition.E_EXTENDS_UNKNOWN: Set the definition'sextendsto the name of an existing definition undersubmodels, or removeextends. The hint lists the definitions you can extend.E_LIBRARY_CATALOGUE: Give each entry incataloguesa uniquename, a non-empty list of stringcolumnsthat includes itskey, and at least one row. Apresetmust name a declared catalogue and give a non-emptymap.E_LIBRARY_FORMAT: Make the file a JSON object withformat_version1 and at least one entry inassets. If present,entitiesmust be a list of objects with unique names.E_LIBRARY_HEADER: Give the file alibraryobject with an identifierid, a non-emptynameand a semverversionsuch as1.0.0. An optionalcolormust be#RRGGBB, andmin_schema_versiona whole number.E_LIBRARY_VERSION: Lowerlibrary.min_schema_versionto a model schema version this build writes, if the library does not use the newer schema. Otherwise use a newer engine, or an older release of the library.E_SUBMODEL: Read the message for the definition that failed to flatten. The usual causes are a missing definition, an argument the definition does not declare, or a link to a port that does not exist.E_SUBMODEL_ARGUMENTS: Make the instance'sargumentsan object that maps each declared parameter name to its value, for example{"capacity": 2}, or remove it to use the defaults.E_SUBMODEL_ARGUMENT_MISSING: Add the parameter to the SUBMODEL instance'sarguments, or give it adefaultin the definition'sparameters. The message names the missing parameter.E_SUBMODEL_ARGUMENT_UNKNOWN: Remove the argument from the instance'sarguments, or rename it to a parameter the definition declares. The hint lists the definition'sparameters; a typo is the usual cause.E_SUBMODEL_ARG_REFERENCE: Declare the named record in the model's matching section, or pass the name of one that exists. The hint lists the records the argument may refer to.E_SUBMODEL_ARG_TYPE: Pass an argument of the type the target parameter or repeat count declares, for example an int rather than2.5or text. The message names the$argand the value it received.E_SUBMODEL_ARG_UNKNOWN: Declare the parameter in the definition'sparameters, or correct the{"$arg": ...}name to one it declares. A$argoutside any submodel definition must become a plain value.E_SUBMODEL_CYCLE: Break the loop the message shows by removing or replacing a SUBMODEL block that instantiates a definition earlier in the chain. A definition cannot contain itself, directly or through another.E_SUBMODEL_DEAD_END: Add aSUB_EXITblock to the definition and link the named block to it, or end that flow in aDISPOSE. Without an exit every flow must end in a DISPOSE.E_SUBMODEL_PORT_NAME: Give everySUB_ENTRYandSUB_EXITblock in the definition a non-emptyportparameter, such asinorout. Links to the instance pick a port by this name.E_SUBMODEL_PORT_REQUIRED: Set the link'ssource_portortarget_portto one of the instance's ports. A port may be left out only when the definition has exactly one port on that side.E_SUBMODEL_PORT_UNKNOWN: Set the link'ssource_portortarget_portto a port the instance has, as listed in the hint. With repeat groups, lowering a count removes ports: delete the link or change the arguments.E_SUBMODEL_REPEAT: Fix the definition'srepeatgroups as the message says. Each needscountand a non-emptyblockslist of its own blocks, and{i}goes in every repeated name or in none.E_SUBMODEL_REPEAT_COUNT: Make the group'scountan int from 0 to 500, a{"$arg": ...}or an expression of the definition's parameters. A group whose names lack{i}takes only 0 or 1.E_SUBMODEL_SCOPE: Move theSUB_ENTRYorSUB_EXITblock into a definition undersubmodels, or delete it. Port blocks mean something only inside a submodel definition.E_SUBMODEL_SCOPED_NAME: Declare a top-level record named as the$namewithout its$, in the section the message names. Flattening clones that template for each instance.E_UNKNOWN_SUBMODEL: Set the instance'sdefinitionto the name of a definition undersubmodels, as listed in the hint, or add the missing definition. A typo is the usual cause.W_LIBRARY_ITEM_CLASH: Check the model's own record against the one the asset ships. If they are different things, rename one; if the model's copy is intended, the warning can stay.W_LIBRARY_UPGRADE: Add amigrationsentry to the new asset version with arename_parameterstep from the old parameter name to the new one, so instances keep the argument's value. Or keep the old parameter inparameters.