Skip to content
This repository was archived by the owner on Jul 14, 2023. It is now read-only.
This repository was archived by the owner on Jul 14, 2023. It is now read-only.

Table insert doens't accept non-string keys, while insert_or_merge does. #33

Open

Description

Which service(blob, file, queue) does this issue concern?

Table Storage

Which version of the SDK was used? Please provide the output of pip freeze.

azure-storage==0.36.0

What problem was encountered?

If you call TableService.insert_entity with an entity that has RowKey or PartitionKey that is not str (in my case I used an int), a AzureHttpError: Bad Request ... InvalidInput ... One of the request inputs is not valid is raised. Turns out this is because RowKey or PartitionKey has to be str.

This took me a while to figure out, because I'd previously uploaded these entities using TableService.insert_or_merge_entity, which works fine! Turns out this method does handle casting the keys to str.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions