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

Python Sample Code error when querying strings including unicodes #11

Open
gbhong opened this issue Jan 27, 2023 · 0 comments
Open

Python Sample Code error when querying strings including unicodes #11

gbhong opened this issue Jan 27, 2023 · 0 comments

Comments

@gbhong
Copy link

gbhong commented Jan 27, 2023

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!

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

1 participant