Skip to content

"__dataPayload" is not defined (PylancereportUndefinedVariable) #9

Description

@Hemant40

Describe the bug

Hi, While running this code i found a issue which shows that the __dataPayload is undefined.

Expected behavior

code needs to be updated with the required variables. If __dataPayload is required please update in the code.

Current behavior

Getting error for "__dataPayload" is not defined (PylancereportUndefinedVariable) in sasiApi.py file.

Possible solution

Steps to reproduce

from auth import saseAuthentication
from access import prismaAccess
from access import policyObjects

p = saseAuthentication.saseAuthentication()
p.prismaAccessAuth("your TSD_ID","Client_id","Client_secert")
n = prismaAccess.prismaAccess(p.saseToken)
o = policyObjects.policyObjects(n)

o.paTagsListTags()

Screenshots

image

Error-details:

(.venv) PS C:\C4I\Hemant_20_02_prismamananged\PrismaSASECloudManaged-Python> python.exe .\test.py
Traceback (most recent call last):
File "C:\C4I\Hemant_20_02_prismamananged\PrismaSASECloudManaged-Python\test.py", line 10, in
o.paTagsListTags()
File "C:\C4I\Hemant_20_02_prismamananged\PrismaSASECloudManaged-Python\access\policyObjects.py", line 47, in paTagsListTags
paTag.paList(__folder)
File "C:\C4I\Hemant_20_02_prismamananged\PrismaSASECloudManaged-Python\access\saseApi.py", line 12, in paList
__response = requests.get(url=self.saseUri, headers=self.saseAuthHeaders, data=__dataPayload)
NameError: name '_saseApi__dataPayload' is not defined

Your Environment

(.venv) PS C:\C4I\Hemant_20_02_prismamananged\PrismaSASECloudManaged-Python> python.exe --version
Python 3.10.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions