Skip to main content
Panther Knowledge Base

How do I resolve the Panther API error "Must Provide Document"?

Issue

When trying to connect to the Panther API through Python, the following error occurs:

TypeError: Must provide document.

Resolution

To resolve this issue, ensure that the query being passed to client.execute is wrapped in a gql object, like so:

client.execute(gql("My Query Here"))

Cause

This issue occurs if the query is not in the correct format. Calls to the GraphQL server must be in the following format:

"query: 'query FunctionName {rest of query here...}'"
  • Was this article helpful?