Skip to content
This repository has been 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
JrtPec opened this issue Dec 13, 2018 · 0 comments
Open

Comments

@JrtPec
Copy link

JrtPec commented Dec 13, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant