{"record":{"id":"7463cdbcf4722fda","repo":"dgtlmoon/changedetection.io","slug":"one-of-the-conditions-rulesets-is-incomplete-ca","errorCode":null,"errorMessage":"One of the 'conditions' rulesets is incomplete, cannot run.","messagePattern":"One of the 'conditions' rulesets is incomplete, cannot run\\.","errorType":"validation","errorClass":"EmptyConditionRuleRowNotUsable","httpStatus":null,"severity":"error","filePath":"changedetectionio/conditions/__init__.py","lineNumber":58,"sourceCode":"\ndef convert_to_jsonlogic(logic_operator: str, rule_dict: list):\n    \"\"\"\n    Convert a structured rule dict into a JSON Logic rule.\n\n    :param rule_dict: Dictionary containing conditions.\n    :return: JSON Logic rule as a dictionary.\n    \"\"\"\n\n\n    json_logic_conditions = []\n\n    for condition in rule_dict:\n        operator = condition[\"operator\"]\n        field = condition[\"field\"]\n        value = condition[\"value\"]\n\n        if not operator or operator == 'None' or not value or not field:\n            raise EmptyConditionRuleRowNotUsable()\n\n        # Convert value to int/float if possible\n        try:\n            if isinstance(value, str) and \".\" in value and str != \"None\":\n                value = float(value)\n            else:\n                value = int(value)\n        except (ValueError, TypeError):\n            pass  # Keep as a string if conversion fails\n\n        # Handle different JSON Logic operators properly\n        if operator == \"in\":\n            json_logic_conditions.append({\"in\": [value, {\"var\": field}]})  # value first\n        elif operator in (\"!\", \"!!\", \"-\"):\n            json_logic_conditions.append({operator: [{\"var\": field}]})  # Unary operators\n        elif operator in (\"min\", \"max\", \"cat\"):\n            json_logic_conditions.append({operator: value})  # Multi-argument operators\n        else:","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/dgtlmoon/changedetection.io/blob/5d9c7c6da76340597243e8163c4f2439237fa0e8/changedetectionio/conditions/__init__.py#L40-L76","documentation":"The bare `except:` after the JSONPath parse call catches any exception other than JsonPathParserError/JsonPathLexerError raised while parsing — for example a TypeError or internal jsonpath_ng error. It indicates an unexpected system failure during JSONPath validation, not a normal syntax problem.","triggerScenarios":"jsonpath_ng.ext.parse raising an unexpected exception type (e.g. TypeError on odd unicode input, recursion errors on deeply nested paths, or version-specific internal exceptions) that is not one of the two handled error classes.","commonSituations":"jsonpath-ng version changes introducing new exception types; pathological or extremely long/nested expressions causing RecursionError; unusual input that hits a jsonpath-ng bug. Rare compared to the handled parser errors.","solutions":["Reproduce the parse in a REPL to see the real exception type","Upgrade/downgrade jsonpath-ng to a stable version (pip install -U jsonpath-ng)","Simplify the expression to avoid pathological nesting"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    parse(expr)\nexcept (JsonPathParserError, JsonPathLexerError):\n    handle_syntax()\nexcept Exception as e:\n    log.exception('unexpected jsonpath-ng failure')\n    handle_system(e)","preventionTips":["Keep jsonpath-ng pinned to a tested version","Avoid extremely long or deeply nested path expressions","Catch Exception separately and log it rather than relying on the library's two error types"],"tags":["jsonpath","jsonpath-ng","catch-all"],"backgroundTag":"jsonpath-expression-invalid","analyzedSha":"5d9c7c6da76340597243e8163c4f2439237fa0e8","analyzedAt":"2026-08-27T19:41:16.067Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}