Skip to content

Retrieving an Azure Data Table with GUID column will return "Object of type UUID is not JSON serializable" error when using az storage entity query #22436

@tsteenbakkers

Description

@tsteenbakkers

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az storage entity query

Errors:

The command failed with an unexpected error. Here is the traceback:
Object of type UUID is not JSON serializable
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 237, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/output.py", line 146, in out
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/output.py", line 37, in format_json
  File "json\__init__.py", line 238, in dumps
  File "json\encoder.py", line 201, in encode
  File "json\encoder.py", line 431, in _iterencode
  File "json\encoder.py", line 405, in _iterencode_dict
  File "json\encoder.py", line 325, in _iterencode_list
  File "json\encoder.py", line 405, in _iterencode_dict
  File "json\encoder.py", line 438, in _iterencode
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/output.py", line 30, in default
  File "json\encoder.py", line 179, in default
TypeError: Object of type UUID is not JSON serializable

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • having a table with a Guid data type entry
  • az storage entity query --table-name {} --connection-string {} --output JSON
    note that the following command will return the same error:
  • az storage entity query --table-name {} --connection-string {}

Expected Behavior

This is related and most likely the same as bugs #22429 and #22250.

Expecting to have a returned result with all columns including the Guid type column

Environment Summary

Windows-10-10.0.19044-SP0
Python 3.10.4
Installer: MSI

azure-cli 2.36.0

Additional Context

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botStorageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions