Skip to content

6. Common Errors

adfarth edited this page Aug 30, 2023 · 1 revision

Missing Inputs

At the time of submission to the host/stable/job endpoint, inputs are checked for required values. Some inputs (i.e. latitude), are required, while others are required only if another related input is provided as specififed in the documentation above. Missing inputs will be flagged in the API response. For example, if one POST's:

{"Scenario": {"Site": {"latitude": 39.0}}}

The API will not respond with a run_uuid, but instead will provide information on the missing inputs:

{
    "inputs": {...},
    "messages": {
      "error": "Invalid inputs. See 'input_errors'."
      "input_errors": [
            "Missing Required for Scenario>Site: longitude",
            "Missing Required for Scenario>Site>LoadProfile: (annual_kwh and doe_reference_name OR doe_reference_name OR doe_reference_name and monthly_totals_kwh OR loads_kw)",
            "Missing Required for Scenario>Site>ElectricTariff: (blended_annual_demand_charges_us_dollars_per_kw and blended_annual_rates_us_dollars_per_kwh OR blended_monthly_demand_charges_us_dollars_per_kw and blended_monthly_rates_us_dollars_per_kwh OR tou_energy_rates_us_dollars_per_kwh OR urdb_label OR urdb_rate_name and urdb_utility_name OR urdb_response)"
        ],
        ...
    "outputs": {
        "Scenario":{
            "run_uuid" : "Error. See messages for more information. Note that inputs have default values filled in.",
            "status": "Invalid inputs. See messages."
        }
    }
}

Invalid Data Type

At the time of submission to the host/stable/job endpoint, inputs are checked for non-compliant values. Those found will be returned in the API response. For example, if one POST's:

{"Scenario": "timeout_seconds": "ONE", ...}

The API will not respond with a run_uuid, but instead will provide information on the invalid inputs:

{
    "inputs": {...},
    "messages": {
      "error": "Invalid inputs. See 'input_errors'."
      "input_errors": [
          "Could not convert timeout_seconds (ONE) in Scenario to 'int'>",
          ...
      ],
    ...
    }
    "outputs": {
        "Scenario":{
            "run_uuid" : "Error. See messages for more information. Note that inputs have default values filled in.",
            "status": "Invalid inputs. See messages."
        }
    }
}

Other Possible Errors

Jobs submitted to the host/stable/job endpoint may also fail for various reasons. The following known issues will be flagged in the 'messages' section of the response under an 'error' attribute.

  • "REopt failed to start."
  • "Optimization exceeded timeout: xx seconds."
  • "REopt could not find an optimal solution for these inputs."
    • An 'infeasible' status is likely due to system size constraints that prevent the load from being met during a grid outage. Please adjust the selected technologies and size constraints and try again."
  • "Unexpected Error"
  • REopt errors/warnings caused during data preprocessing, optimization, or data postprocessing. Warnings and errors associated with these tasks will be returned to the users within the 'messages' section of the response under a 'errors' or 'warnings' attributes. Note that a successful optimal REopt run can be returned with 'warnings'.
    • Each returned warning / error contains the file name and line number where the warning/error originated along with a message. These file names and line numbers correspond to code in REopt.jl Github repo.
    • In case of an unhandled error, the error will be returned along with a stacktrace to provide more context around the error condition.
{
    "inputs": {...},
    "messages": {
        "info": "When using doe_reference_name or blended_doe_reference_names for ElectricLoad the year is set to 2017 because the DoE load profiles start on a Sunday.",
        "errors": {},
        "warnings": {
            "core_electric_utility.jl_170": [
                " Cannot find hourly CO2 emissions for region nothing. Setting emissions to zero.",
                " Cannot find hourly NOx emissions for region nothing. Setting emissions to zero.",
                " Cannot find hourly SO2 emissions for region nothing. Setting emissions to zero.",
                " Cannot find hourly PM25 emissions for region nothing. Setting emissions to zero."
            ],
            "core_electric_utility.jl_304": [
                " Your site location (30.78",
                " 112.45) is more than 5 miles from the nearest AVERT region. Cannot calculate emissions."
            ],
            "core_doe_commercial_reference_building_loads.jl_75": [
                " Could not find latitudelongitude in U.S. Using geometrically nearest city."
            ],
            "core_electric_utility.jl_271": [
                " Could not find AVERT region containing site latitudelongitude. Checking site proximity to AVERT regions."
            ]
        },
        "has_stacktrace": "false"
    }