Skip to main content
Panther Knowledge Base

How to fix "TypeError: 'type' object is not subscriptable" when uploading to my Panther repo

Issue

I'm using a CI/CD workflow, where my detections are stored in a git repo, and I upload the detections to Panther with Panther Analysis Tool (PAT). When I try uploading, I get the following error:

TypeError: 'type' object is not subscriptable

Resolution

To resolve this issue:

  1. Upgrade your local Python installation to 3.9 or higher
  2. Reinstall PAT with the new Python version.

Cause

This issue occurs due to an incompatibility between the "standard" type hinting, introduced in Python 3.9, and earlier versions. In 3.9+, you can use type hints like list[int], whereas in earlier Python versions, you'd need to specify typing.List[int]