imriss
imriss

Reputation: 1971

Ansible Error: local variable 'value' referenced before assignment

When trying to retrieve some of the fields of a JSON, ansible throws this error:

UnboundLocalError: local variable 'value' referenced before assignment

The structure, fields' name, and indentation of the JSON do not seem to be the issue.

Thanks.

Upvotes: 1

Views: 2554

Answers (1)

imriss
imriss

Reputation: 1971

The issue was the special space characters that were used in the source file of the JSON. After converting to ANSI, they appeared as  . After replacing them with the regular space characters, the error message disappeared.

Upvotes: 1

Related Questions