diff --git a/edg/parts/JlcResistor.py b/edg/parts/JlcResistor.py index 80a3e4ef2..a3c0a5d5d 100644 --- a/edg/parts/JlcResistor.py +++ b/edg/parts/JlcResistor.py @@ -51,8 +51,11 @@ def parse_row(row: PartsTableRow) -> Optional[Dict[PartsTableColumn, Any]]: new_cols[cls.POWER_RATING] = Range.zero_to_upper( PartParserUtil.parse_value(extracted_values['power'][1], 'W')) - new_cols[cls.VOLTAGE_RATING] = Range.zero_to_upper( - PartParserUtil.parse_value(extracted_values['voltage'][1], 'V')) + if 'voltage' in extracted_values: + new_cols[cls.VOLTAGE_RATING] = Range.zero_to_upper( + PartParserUtil.parse_value(extracted_values.get('voltage', ('', '0V'))[1], 'V')) + else: + new_cols[cls.VOLTAGE_RATING] = Range(0, 0) return new_cols except (KeyError, PartParserUtil.ParseError):