Nextdoor/ndscheduler

the JSON object must be str, not 'bytes'

tschm opened this issue · 1 comments

tschm commented

I am trying to define some simple tasks...

2017-11-21 17:08:57,060 - tornado.application - ERROR - Uncaught exception PUT /api/v1/jobs/098bb546ced011e7b27f10c37b505584 (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:7778', method='PUT', uri='/api/v1/jobs/098bb546ced011e7b27f10c37b505584', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Content-Type': 'application/json; charset=UTF-8', 'Origin': 'http://localhost:7778', 'Host': 'localhost:7778', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36', 'Connection': 'keep-alive', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7', 'Cookie': 'sidebar_pinned=false; PGADMIN_LANGUAGE=en; csrftoken=BgZcnLvOC9ptQSyc990Ith4oEqtx7RtL9DKUVWkYcyhxcKvR89vYrsC1DeUiPFm3; Pycharm-379b065f=6f9c7e1a-a633-4337-b1b1-a73535c20137; session=eyJfY3NyZl90b2tlbiI6ImM2NDJiNzU2MDQ2MDM2OGZkMmYxZDg5MzVhZjJmMGUyMTk0Nzk4NDAifQ.DL0HWg.fhwDX-MWDAlOssKqbZVDSupE7PM; COVERAGE_INDEX_SORT=', 'Content-Length': '178', 'Accept': '*/*', 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'http://localhost:7778/'})
Traceback (most recent call last):
  File "/home/thomas/github/production/env/lib/python3.5/site-packages/tornado/web.py", line 1422, in _execute
    result = self.prepare()
  File "/home/thomas/github/production/env/lib/python3.5/site-packages/ndscheduler/server/handlers/base.py", line 25, in prepare
    self.json_args = json.loads(self.request.body)
  File "/home/thomas/github/production/env/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
tschm commented

It might be helpful to make a new release. Your latest release is from April. In May you fixed errors related to Python 3.5