Skip to content

CLI service_level_objective show fails with 'Namespace' object has no attribute 'string_ids' #875

@huyhua-nvg

Description

@huyhua-nvg

Describe the bug
cli service_level_objective show does not work.

To Reproduce
Steps to reproduce the behavior:

  1. Use the cli tool with dogshell service_level_objective show <slo_id>
  2. Error shown:
Traceback (most recent call last):
  File "/Users/user/.pyenv/versions/3.11.10/bin/dogshell", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/user/.pyenv/versions/3.11.10/lib/python3.11/site-packages/datadog/dogshell/__init__.py", line 109, in main
    args.func(args)
  File "/Users/user/.pyenv/versions/3.11.10/lib/python3.11/site-packages/datadog/dogshell/service_level_objective.py", line 326, in _show
    if args.string_ids:
       ^^^^^^^^^^^^^^^
AttributeError: 'Namespace' object has no attribute 'string_ids'

Expected behavior
the SLO with correct id is displayed.

Screenshots
If applicable, add screenshots to help explain your problem.
Image

Environment and Versions (please complete the following information):
A clear and precise description of your setup:

  • dogshell v0.50.2
  • python v3.11

Additional context
Removing the lines below will fix the issue:

if args.string_ids:
res["id"] = str(res["id"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugBug related issuestaleStale - Bot reminder

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions