oci identity-domains users list --all causes error TypeError: 'int' object is not iterable
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
See error at end of the output below. If I use --count 9999 instead of --all I get output (and get all rows since my total user count is less than 9999).
$ oci --version
3.25.3
macOS-13.3.1-x86_64-i386-64bit
System name: Darwin
System release : 22.4.0
System version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64
oci identity-domains users list --endpoint https://idcs-a092ed3840a0955f7946776bf02f26fd.identity.oraclecloud.com:443 --all
env OCI_CONFIG_PROFILE is set
env OCI_CLI_PROFILE is set
env OCI_PYTHON_SDK_NO_SERVICE_IMPORTS is set
DEBUG:oci_cli.cli_util:Config File: dict_keys(['log_requests', 'additional_user_agent', 'pass_phrase', 'user', 'fingerprint', 'tenancy', 'region', 'key_file'])
DEBUG:oci_cli.cli_util:region: Environment Variable or Parameter
DEBUG:oci_cli.cli_util:endpoint: Environment Variable or Parameter
DEBUG:oci.base_client.4618027552:Endpoint: https://idcs-a092ed3840a0955f7946776bf02f26fd.identity.oraclecloud.com:443/admin/v1
INFO:oci.base_client.4618027552: 2023-04-21 14:01:50.660568: Request: GET https://idcs-a092ed3840a0955f7946776bf02f26fd.identity.oraclecloud.com:443/admin/v1/Users
Not using Expect header...
send: b'GET /admin/v1/Users HTTP/1.1\r\nuser-agent: Oracle-PythonSDK/2.99.0 (python 3.10.5; x86_64-Darwin) Oracle-PythonCLI/3.25.3\r\naccept-encoding: gzip, deflate\r\naccept: application/json, application/scim+json\r\nconnection: keep-alive\r\ncontent-type: application/json\r\nopc-retry-token: eL9ECQeEAbaoY0Kypw2bd5UsnTfEKp\r\nopc-client-retries: true\r\nopc-client-info: Oracle-PythonSDK/2.99.0\r\nopc-request-id: 046CB3B5CA6C4AEB84D5D68C915D1EB5\r\ndate: Fri, 21 Apr 2023 14:01:50 GMT\r\nhost: idcs-a092ed3840a0955f7946776bf02f26fd.identity.oraclecloud.com:443\r\nauthorization: Signature algorithm="rsa-sha256",headers="date (request-target) host",keyId="ocid1.tenancy.oc1..aaaaaaaadkubm5adcrpvvl5yetbtohnnrihrypi7hbj4rbbizek7siqscnpa/ocid1.user.oc1..aaaaaaaal45iaw7w32mu32gb7vre6tub6pdo3xt6p3dclmsrxh4gxktefhpa/54:0d:d4:2d:f7:98:a6:b4:61:7a:15:89:a7:14:d8:d1",signature="hV1RKII05wRZqdPbp+Z+AUdVoBzLg0+uv1kKlRB/n6eK4+pfJjmp0NlnBw59wQJwDR20myLw6KEgH6gf5Lyld9GUt9WM5UsXw21JOz6nvqU4N/GshxPFVmbIWuutYA2xvN4C54+k1nJ2xGaQgX8YETWaFEAOU/eYlY6hpSlLWWGVFTvdOd21AGe7adoA4wuHD1b2A1hnnNghKtevQuBSC3oPsymkd4H8WmuoXThGfyY4ePq+b4HZaNPpCwbHn2Sh8JUi/OfbG/Vbpl8cCkh7eXb+c72ttwoabdrXiU3ZE4cNccrvqmI8Xvfz4hAcXJrgT4zFaZ02KqPWn8hk5+/vqQ==",version="1"\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Cache-Control: no-cache, no-store, must-revalidate
header: Content-Type: application/json;charset=utf-8
header: Date: Fri, 21 Apr 2023 14:01:50 GMT
header: Expires: Sat, 01 Jan 2000 00:00:00 GMT
header: Opc-Request-Id: 046CB3B5CA6C4AEB84D5D68C915D1EB5/6IruM0tQB10000000
header: Pragma: no-cache
header: Server: envoy
header: Strict-Transport-Security: max-age=31536000; includeSubDomains
header: Vary: origin
header: Via: 1.1 net-idcs-config
header: X-Content-Type-Options: nosniff
header: X-Envoy-Upstream-Service-Time: 65
header: X-Frame-Options: deny
header: X-Oracle-Dms-Ecid: 046CB3B5CA6C4AEB84D5D68C915D1EB5/6IruM0tQB10000000
header: X-Oracle-Dms-Rid: 0:1
header: X-Xss-Protection: 1; mode=block
header: Transfer-Encoding: chunked
DEBUG:oci.base_client.4618027552: 2023-04-21 14:01:51.326611: time elapsed for request 046CB3B5CA6C4AEB84D5D68C915D1EB5: 0.665969843044877
DEBUG:oci.base_client.4618027552: 2023-04-21 14:01:51.326731: time elapsed in response: 0:00:00.304847
DEBUG:oci.base_client.4618027552: 2023-04-21 14:01:51.326770: Response status: 200
DEBUG:oci.base_client.4618027552: 2023-04-21 14:01:51.337655: python SDK time elapsed for deserializing: 0.009733479004353285
DEBUG:oci.base_client.4618027552: 2023-04-21 14:01:51.337823: Response returned
DEBUG:oci.base_client.4618027552:time elapsed for request: 0.6773131689988077
Traceback (most recent call last):
File "/Users/myuser/bin/oci", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/oci_cli/json_skeleton_utils.py", line 78, in wrapped_call
func(ctx, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/oci_cli/cli_util.py", line 871, in wrapped_call
func(ctx, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/services/identity_domains/src/oci_cli_identity_domains/generated/identitydomains_cli.py", line 7623, in list_users
result = cli_util.list_call_get_all_results(
File "/usr/local/lib/python3.10/site-packages/oci_cli/cli_util.py", line 1984, in list_call_get_all_results
aggregated_results_dict[key] = list(chain.from_iterable(aggregated_results_dict[key]))
TypeError: 'int' object is not iterable
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce oci identity-domains users list --all and compare it with the working --count 9999 case. Start in oci_cli/cli_util.py at list_call_get_all_results, then inspect the generated identitydomains_cli.py list_users entry point. Done means --all completes without the reported TypeError and returns the users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100