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

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 74: ordinal not in range(128) #77

Open
pavelsr opened this issue Dec 11, 2019 · 0 comments

Comments

@pavelsr
Copy link

pavelsr commented Dec 11, 2019

ok ( "name":"Hello world" )

$ curl -d '{"job_class_string":"simple_scheduler.jobs.sample_job.AwesomeJob","name":"Hello world","month":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8888/api/v1/jobs
{"job_id": "a1d9c1861c6b11ea885b0242c0a82002"}

not ok ( "name":"Россия", utf8 symbols ) :

$ curl -d '{"job_class_string":"simple_scheduler.jobs.sample_job.AwesomeJob","name":"Россия","month":"1"}' -H "Content-Type: application/json; charset=utf-8" -X POST http://localhost:8888/api/v1/jobs
Traceback (most recent call last):
  File "/mnt/scheduler/local/lib/python2.7/site-packages/tornado/web.py", line 1422, in _execute
    result = self.prepare()
  File "/mnt/scheduler/src/ndscheduler/ndscheduler/server/handlers/base.py", line 25, in prepare
    self.json_args = json.loads(self.request.body.decode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 74: ordinal not in range(128)
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