Skip to content

Python Sample Code error when querying strings including unicodes #11

@gbhong

Description

@gbhong

Hello, I tried to use this Python sample code but found that this code would raise UnicodeEncodeError, and this is because my query includes special characters that can't be encoded by 'ascii' codec. This is because your baseline code for Python uses urllib package and this urllib can only handle ASCII requests.

So, I'd recommend to change this urllib-based scripts to simple requests package, which can handle those kind of special characters. If you don't mind, I can pull request those part after fork this code. If there is a reason to use urllib, then never mind on my issue. Thanks!

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