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

[Bug]: Error when viewing details for an image using either tabular or text output. #707

Open
leonardobdes opened this issue Dec 27, 2024 · 0 comments
Labels
bug issues that report a bug

Comments

@leonardobdes
Copy link

CLI Version

linode-cli v5.55.0 Built from spec version 4.191.1

Command

linode-cli images view linode/debian12-kube-v1.31.0

Output

  ┌──────────────────────────────┬────────────────────────────────┬────────┬─────────────┬───────────┬──────┬───────────┬──────────────┬────────────┬──────┐

│ id │ label │ vendor │ description │ is_public │ size │ status │ capabilities │ total_size │ tags │
├──────────────────────────────┼────────────────────────────────┼────────┼─────────────┼───────────┼──────┼───────────┼──────────────┼────────────┼──────┤
│ linode/debian12-kube-v1.31.0 │ Kubernetes 1.31.0 on Debian 12 │ Debian │ │ True │ 3500 │ available │ cloud-init │ │ │
└──────────────────────────────┴────────────────────────────────┴────────┴─────────────┴───────────┴──────┴───────────┴──────────────┴────────────┴──────┘
Traceback (most recent call last):
File "/home/user/.local/bin/linode", line 8, in
sys.exit(main())
~~~~^^
File "/home/user/.local/share/pipx/venvs/linode-cli/lib/python3.13/site-packages/linodecli/init.py", line 234, in main
cli.handle_command(parsed.command, parsed.action, args)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/share/pipx/venvs/linode-cli/lib/python3.13/site-packages/linodecli/cli.py", line 149, in handle_command
operation.process_response_json(result, self.output_handler)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/share/pipx/venvs/linode-cli/lib/python3.13/site-packages/linodecli/baked/operation.py", line 543, in process_response_json
handler.print_response(self.response_model, json)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/share/pipx/venvs/linode-cli/lib/python3.13/site-packages/linodecli/output/output_handler.py", line 163, in print_response
self._scope_data_to_subtable(data, table_name)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/home/user/.local/share/pipx/venvs/linode-cli/lib/python3.13/site-packages/linodecli/output/output_handler.py", line 209, in _scope_data_to_subtable
raise IndexError(f"Segment {seg} missing from input data")
IndexError: Segment regions missing from input data

Expected Behavior

Show the table, not the table + error.

Actual Behavior

linodecli/output/output_handler.py
Method _scope_data_to_subtable, receives the variable table as "regions".
It gives that error because it can't split that value using ".".

Steps to Reproduce

Just run the command.
I found this while looking for linode/debian12-kube-v1.31.0, but the same problem happens with other images.
This error appears in both tabular and text output. JSON is fine.

@leonardobdes leonardobdes added the bug issues that report a bug label Dec 27, 2024
@leonardobdes leonardobdes changed the title [Bug]: Error when viewing details for a image using either tabular or text output. [Bug]: Error when viewing details for an image using either tabular or text output. Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues that report a bug
Projects
None yet
Development

No branches or pull requests

1 participant