Skip to content

robot.variables.notfound

variable_not_found

1
2
3
variable_not_found(
    name, candidates, message=None, deco_braces=True
)

Raise DataError for missing variable name.

Return recommendations for similar variable names if any are found.

Source code in src/robot/variables/notfound.py
def variable_not_found(name, candidates, message=None, deco_braces=True):
    """Raise DataError for missing variable name.

    Return recommendations for similar variable names if any are found.
    """
    candidates = _decorate_candidates(name[0], candidates, deco_braces)
    normalizer = partial(normalize, ignore='$@&%{}_')
    message = RecommendationFinder(normalizer).find_and_format(
        name, candidates,
        message=message or "Variable '%s' not found." % name
    )
    raise VariableError(message)