Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Surbhi-sy opened this issue Sep 3, 2024 · 6 comments
Open

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

Surbhi-sy opened this issue Sep 3, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Surbhi-sy
Copy link

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
Copy link

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

@willguibr
Copy link
Member

@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

@willguibr willguibr self-assigned this Sep 3, 2024
@willguibr willguibr added the bug Something isn't working label Sep 3, 2024
@Surbhi-sy
Copy link
Author

Surbhi-sy commented Sep 4, 2024

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

There are around 30 locations available.

@willguibr
Copy link
Member

@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
Copy link
Author

@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
Copy link
Member

willguibr commented Sep 11, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ⚙️ In development
Development

No branches or pull requests

3 participants