Turall/OPA-python-client

get_policy_path_and_rules

evanerwee opened this issue · 1 comments

The method return an error (Postman work just fine)

raceback (most recent call last):
File "/home/eerwee/PycharmProjects/opa_client/main.py", line 15, in
ops_actions.get_policy_path_and_rules()
File "/home/eerwee/PycharmProjects/opa_client/opa_client_actions.py", line 38, in get_policy_path_and_rules
self.client.get_policies_info()
File "/home/eerwee/miniconda3/envs/opa_client/lib/python3.10/site-packages/opa_client/opa.py", line 193, in get_policies_info
return self.__get_policies_info()
File "/home/eerwee/miniconda3/envs/opa_client/lib/python3.10/site-packages/opa_client/opa.py", line 522, in __get_policies_info
for rule in policy.get("ast").get("rules"):
TypeError: 'NoneType' object is not iterable

Hi @evanerwee , pls provide more information about the problem.