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

Can't insert entity with chinese string property #91

Closed
erinus opened this issue Dec 26, 2015 · 2 comments
Closed

Can't insert entity with chinese string property #91

erinus opened this issue Dec 26, 2015 · 2 comments

Comments

@erinus
Copy link

erinus commented Dec 26, 2015

[1] If I use the codes. it gets error response.
Code:
entity = azure.storage.table.Entity()
entity.SiteCode = '232633627068'
entity.SiteName = azure.storage.table.EntityProperty('Edm.String', '蘋果新聞'.encode('utf-16'))
table.insert_entity('sites', entity)

Response:
azure.common.AzureHttpError: Bad Request

InvalidInputOne of the request inputs is not valid.

RequestId:b87b16db-0002-004b-4b15-40a58e000000
Time:2015-12-26T19:44:59.4595166Z

[2] If I use the codes. it gets success response.
Code:
entity = azure.storage.table.Entity()
entity.SiteCode = '232633627068'
table.insert_entity('sites', entity)

@emgerner-msft
Copy link
Member

I am not able to reproduce this with Python 3.4 and fully up to date dependencies. What version of Python are you using so I can try with a more similar setup?

Note: If you check out the test_unicode_property_value unit test, you'll see that directly inserting unicode with no encoding should work. Could you try something similar to this code?

@jehine-MSFT
Copy link
Contributor

Closing as we were not able to repro this issue. Please reopen if you can provide us with a more detailed repro.

Thanks!

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

No branches or pull requests

3 participants