{"record":{"id":"92f5761177b55393","repo":"dgtlmoon/changedetection.io","slug":"browserstepsstepexception","errorCode":null,"errorMessage":"BrowserStepsStepException","messagePattern":"BrowserStepsStepException","errorType":"exception","errorClass":"BrowserStepsStepException","httpStatus":null,"severity":"error","filePath":"changedetectionio/content_fetchers/base.py","lineNumber":240,"sourceCode":"                    # Support for jinja2 template in step values, with date module added\n                    if '{%' in step['optional_value'] or '{{' in step['optional_value']:\n                        optional_value = jinja_render(template_str=step['optional_value'])\n                    if '{%' in step['selector'] or '{{' in step['selector']:\n                        selector = jinja_render(template_str=step['selector'])\n\n                    await getattr(interface, \"call_action\")(action_name=step['operation'],\n                                                      selector=selector,\n                                                      optional_value=optional_value)\n                    await self.screenshot_step(step_n)\n                    await self.save_step_html(step_n)\n                except (Error, TimeoutError, ValueError) as e:\n                    # ValueError is what validate_fetch_url_async() raises when a step's URL is\n                    # refused (file://, private IP, bad scheme) - report it against the offending\n                    # step number like any other step failure, rather than failing the whole watch\n                    # with an opaque error.\n                    logger.debug(str(e))\n                    # Stop processing here\n                    raise BrowserStepsStepException(step_n=step_n, original_e=e)\n\n    # It's always good to reset these\n    def delete_browser_steps_screenshots(self):\n        import glob\n        if self.browser_steps_screenshot_path is not None:\n            dest = os.path.join(self.browser_steps_screenshot_path, 'step_*.jpeg')\n            files = glob.glob(dest)\n            for f in files:\n                if os.path.isfile(f):\n                    os.unlink(f)\n\n    def save_step_html(self, step_n):\n        if self.browser_steps_screenshot_path and not os.path.isdir(self.browser_steps_screenshot_path):\n            logger.debug(f\"> Creating data dir {self.browser_steps_screenshot_path}\")\n            os.mkdir(self.browser_steps_screenshot_path)\n        pass\n","sourceCodeStart":222,"sourceCodeEnd":257,"githubUrl":"https://github.com/dgtlmoon/changedetection.io/blob/5d9c7c6da76340597243e8163c4f2439237fa0e8/changedetectionio/content_fetchers/base.py#L222-L257","documentation":"The validator checks allow_json again after successfully parsing a json: expression and rejects it with 'jq not permitted in this field!' (a misleading message — it actually means JSONPath extraction is not permitted here). It is a second gate for fields that disallow the json: prefix.","triggerScenarios":"A json: line that parses successfully but the field's allow_json flag is False — i.e. the same condition as error [42], reached via a slightly different code path/message. Triggered by entering valid JSONPath in a JSON-disallowed field.","commonSituations":"Same as the JSONPath-not-permitted case: pasting extraction rules into the wrong field; custom forms reusing the validator with allow_json unset.","solutions":["Use the field that allows JSONPath extraction","Enable allow_json=True when constructing the validator in custom forms"],"exampleFix":"null","handlingStrategy":"validation","validationCode":"def can_use_json_lines(allow_json: bool) -> bool:\n    return allow_json  # gate UI/inputs on the same flag the validator uses","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat 'jq not permitted in this field!' on a json: line as 'JSONPath not allowed here'","Keep extraction rules in the designated extract/JSON field"],"tags":["jsonpath","form-validation","misleading-message"],"backgroundTag":"jsonpath-not-allowed","analyzedSha":"5d9c7c6da76340597243e8163c4f2439237fa0e8","analyzedAt":"2026-08-27T19:41:16.067Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}