zscaler / ziacloud-ansible

Ansible collection that automates the configuration and operational tasks on Zscaler Internet Access, using the ZIA API.
https://zscaler.github.io/ziacloud-ansible/
MIT License
4 stars 0 forks source link

Getting TypeError: object of type 'Response' has no len() #45

Open Surbhi-sy opened 2 months ago

Surbhi-sy commented 2 months ago

Hello, I am trying to fetch the locations management info from zscaler_ziacloud module in ansible. But getting the below error while executing the playbook:

The full traceback is: Traceback (most recent call last): File "/tmp/ansible_zscaler.ziacloud.zia_location_management_info_payload_zlfipp5r/ansible_zscaler.ziacloud.zia_location_management_info_payload.zip/ansible_collections/zscaler/ziacloud/plugins/modules/zia_location_management_info.py", line 280, in main File "/tmp/ansible_zscaler.ziacloud.zia_location_management_info_payload_zlfipp5r/ansible_zscaler.ziacloud.zia_location_management_info_payload.zip/ansible_collections/zscaler/ziacloud/plugins/modules/zia_location_management_info.py", line 268, in core File "/usr/local/lib/python3.9/site-packages/zscaler/zia/locations.py", line 69, in list_locations return BoxList(Iterator(self.rest, "locations", **kwargs)) File "box/box_list.py", line 51, in box.box_list.BoxList.init File "/usr/local/lib/python3.9/site-packages/restfly/iterator.py", line 114, in next return self.next() # noqa: PLE1102 File "/usr/local/lib/python3.9/site-packages/restfly/iterator.py", line 146, in next if len(self.page) == 0: TypeError: object of type 'Response' has no len()

"msg": "object of type 'Response' has no len()"

sandeepmuttineni222 commented 2 months ago

Me too getting the same error.... Please help regarding this error

willguibr commented 2 months ago

@Surbhi-sy @sandeepmuttineni222 Can you provide the playbook example you're executing? Also, can you indicate how many locations are currently present in your respective tenants?

Zscaler DevRel

Surbhi-sy commented 2 months ago

@willguibr, please find the required info below this is the playbook that I am using. image

There are around 30 locations available.

willguibr commented 2 months ago

@sandeepmuttineni222 and @Surbhi-sy We have been unable to reproduce the problem you're reporting. Pease raise a case with the Zscaler support team, so that they can coordinate a call with our team for further investigation. Thank you Zscaler DevRel

Surbhi-sy commented 2 months ago

@willguibr, could you please provide me with the list of python packages and their version that are installed in your environment. so that i can match the same in my environment and analyze if there are any gaps. Doing so might help us resolve the issue, if it is caused by different version of the python packages.

willguibr commented 2 months ago

@Surbhi-sy As per the documentation here you must have the zscaler-sdk-python installed on your local machine prior to executing the collection. Or If you have cloned the collection from GitHub, navigate to the root directory of the repository and simply execute the requirements.txt file using pip. That will install the zscaler-sdk-python and all further dependencies.

pip install -r requirements.txt
Surbhi-sy commented 2 months ago

@sandeepmuttineni222 and @Surbhi-sy We have been unable to reproduce the problem you're reporting. Pease raise a case with the Zscaler support team, so that they can coordinate a call with our team for further investigation. Thank you Zscaler DevRel

hi, i have opened up a case with Zscaler support team regarding this issue and would like to have a connect with you and zscaler support team. Please let me know, how that can be arranged, will request zscaler support team to arrange the same.

Surbhi-sy commented 1 month ago

@sandeepmuttineni222 and @Surbhi-sy We have been unable to reproduce the problem you're reporting. Pease raise a case with the Zscaler support team, so that they can coordinate a call with our team for further investigation. Thank you Zscaler DevRel

hi, i have opened up a case with Zscaler support team regarding this issue and would like to have a connect with you and zscaler support team. Please let me know, how that can be arranged, will request zscaler support team to arrange the same.

@willguibr, please suggest a way so that I can schedule a call with with you zscaler support team.

willguibr commented 1 month ago

@Surbhi-sy Please raise a support case with Zscaler support.

Zscaler DevRel.

Surbhi-sy commented 1 month ago

@Surbhi-sy Please raise a support case with Zscaler support.

Zscaler DevRel.

@willguibr I have already opened a case with them, but they also want to know this -- is there a way so that they can have you on the call as well.