How to resolve "cannot access local variable 'yaml'" error in Panther Analysis Tool
Issue
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
Resolution
To resolve this issue:, remove any custom JSON files from the current directory. Alternatively, remove/alter the file extension to something other than .json
Cause
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.