[英]Paperboy throwing error: TypeError: the JSON object must be str, not 'bytes'?
I have installed paperboy using steps given at https://github.com/timkpaine/paperboy.git我已经使用https://github.com/timkpaine/paperboy.git给出的步骤安装了paperboy
and executed using并使用
python3 -m paperboy
while uploading notebook from UI从 UI 上传笔记本时
when click on the save button UI not responding but throwing below error on console当单击保存按钮 UI 没有响应但在控制台上抛出以下错误时
CRITICAL:root:list : <class 'paperboy.storage.sqla.models.report.ReportSQL'>, result : 0 - 0 [2019-12-03 15:26:01 +0530] [24991] [ERROR] Error handling request /api/v1/notebooks?action=save Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/gunicorn/workers/sync.py", line 135, in handle self.handle_request(listener, req, client, addr) File "/usr/local/lib/python3.5/dist-packages/gunicorn/workers/sync.py", line 176, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/usr/local/lib/python3.5/dist-packages/falcon/api.py", line 244, in __call__ responder(req, resp, **params) File "/home/exa00112/xstream/paperboy/paperboy/resources/notebook.py", line 21, in on_post resp.body = json.dumps(self.db.notebooks.store(req.context['user'], req.params, self.session)) File "/home/exa00112/xstream/paperboy/paperboy/storage/sqla/notebook.py", line 44, in store notebook = nbformat.writes(strip_outputs(nbformat.reads(params.get('file').file.read(), 4))) File "/usr/local/lib/python3.5/dist-packages/nbformat/__init__.py", line 74, in reads nb = reader.reads(s, **kwargs) File "/usr/local/lib/python3.5/dist-packages/nbformat/reader.py", line 58, in reads nb_dict = parse_json(s, **kwargs) File "/usr/local/lib/python3.5/dist-packages/nbformat/reader.py", line 14, in parse_json nb_dict = json.loads(s, **kwargs) File "/usr/lib/python3.5/json/__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes'
Use a master branch to install paperboy https://github.com/timkpaine/paperboy.git使用 master 分支安装 paperboy https://github.com/timkpaine/paperboy.git
git clone https://github.com/timkpaine/paperboy.git
cd paperboy
conda create --name python3.7 python=3.7
conda activate python3.7
npm install
npm run build
pip install -e .
then open然后打开
paperboy/server/deploy_nix.py
change line number 2 with将第 2 行更改为
from six import iteritems #from gunicorn.six import iteritems
then run然后运行
python -m paperboy
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.