Skip to content

Conversation

JoeJimFlood
Copy link
Contributor

@JoeJimFlood JoeJimFlood commented Oct 8, 2025

This pull request reclassifies most of the generic RuntimeError exceptions that were described in Issue #692. It includes new exceptions that were created based on an inventory of the existing RuntimeErrors:

  • SettingsConfiguratonError: There is an error with the entire modeling system, likely caused by something not being correct in the run's settings file (settings.yaml if not otherwise specified).
  • ModelConfigurationError: Something is wrong with the configuration of a model step.
  • InvalidTravelError: ActivitySim is unable to create a trip or tour that has the necessary attributes. For example, this error will be raised if a joint tour that is supposed to have both children and adults traveling can't force at least one of each on the tour.
  • TableSlicingError: There was some issue with slicing a table in the pipeline while setting up multiprocessing.
  • SubprocessError: One of the subprocesses failed while multiprocessing. The user will then need to check that process' log to see exactly what the error was.
  • SegmentedSpecificationError: An error occurred while creating the specification for a segmented model component. This is unlikely to occur in production.
  • TableIndexError: There was an issue involving the index of a skim or table stored in memory, such as if a desired origin is not in a skim.
  • EstimationDataError: There is something wrong with the data used in estimation mode.
  • InputTableError: There is an issue with one of the input tables to the model. For example, this will be raised if not every record in the input persons table has a household ID within the households table.

These were created from identifying recurring patterns in an inventory of existing RuntimeErrors within the ActivitySim source code. The context surrounding each exception was analyzed which was used to determine the appropriate exception (if there were to be a change). It would be greatly appreciated if reviewers could think of the following questions when reviewing:

  • If an exception were to be changed, does it make sense?
  • Do the changes make it easier for the user to solve issues when debugging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant