Errors and troubleshooting¶
PyExtrusion uses stable public error codes beginning with PX.
Common error categories¶
| Code | Name | Typical meaning |
|---|---|---|
| PX1001 | InvalidPressConfiguration | Invalid press definition or range |
| PX1002 | InvalidProfileInput | Invalid profile data |
| PX1003 | InvalidProductionInput | Invalid process/production data |
| PX1004 | UnknownResultField | Unknown result-field identifier |
| PX1005 | UnsupportedSchemaVersion | JSON schema version is not supported |
| PX1006 | InvalidAnnualDemand | Invalid annual-demand input |
| PX1007 | InputFileError | Input file cannot be read/parsed correctly |
| PX1008 | UnknownResultSection | Unknown result section |
| PX1009 | InvalidResultSelection | Invalid field/result selection |
| PX1010 | InvalidStudyAdjustment | Invalid case adjustment |
| PX1011 | InvalidPlanningRequest | Invalid planning request |
| PX1012 | InvalidProductionSequence | Invalid production sequence |
| PX1013 | InvalidComparison | Invalid multi-press comparison |
Example: wrong unit¶
Input:
PyExtrusion rejects the cut length because the public field is in millimetres and the supported range starts at 1000 mm.
Correct:
Example: canonical trim combined with legacy zero¶
Rejected as ambiguous:
For a new canonical case, omit both legacy fields (or use None). For existing data, first verify the old family and migrate explicitly. There is no automatic precedence, and simply renaming front_scrap_m can halve the intended total for p=2.
Example: fractional exits¶
Invalid:
The number of exits must be a whole positive integer.
Example: numeric string in JSON¶
Invalid:
Correct:
PyExtrusion does not silently convert numeric strings.
Example: sequence contains a time-window order¶
A sequence represents explicit production orders. Requests such as PlanningRequest.hours(2) are capacity questions and should be calculated independently, not used as a normal ProductionOrder quantity.
Example: unsupported but not necessarily impossible in the real world¶
If PyExtrusion says a scenario is supported=False, it means the current model is not approved to calculate that configuration. It does not necessarily mean the physical process is impossible in every extrusion plant.
CLI help¶
Use:
or:
for the package's current error descriptions.