Skip to main content
Panther Knowledge Base

How to resolve "cannot access local variable 'yaml'" error in Panther Analysis Tool


When using PAT (Panther Analysis Tool) for testing or uploading, the following error occurs:

UnboundLocalError: cannot access local variable 'yaml' where it is not associated with a value


To resolve this issue:​​​​​​, remove any custom JSON files from the current directory. Alternatively, remove/alter the file extension to something other than .json


This issue occurs because PAT assumes any local JSON files are configuration files, and attempts to parse them. If the JSON file format is different than expected, PAT encounters this error.