无法将Jupyter Notebook发布至Medium平台的问题求助
使用jupyter_to_medium发布Jupyter Notebook到Medium时遇JSONDecodeError报错
我正在使用jupyter_to_medium包将版本为6.1.5的Jupyter Notebook发布至Medium平台,执行以下代码时持续报错:
import jupyter_to_medium as jtm jtm.publish(r"C:\Users\user\Downloads\people_analytics_HR_attrition_rate.ipynb", integration_token=None, pub_name=None, title=None, tags=None, publish_status='draft', notify_followers=False, license='all-rights-reserved', canonical_url=None, chrome_path=None, save_markdown=False, table_conversion='chrome')
报错信息如下:
Failed to post to Medium Returned error message below "JSONDecodeError: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File \"C:\\Users\\user\\anaconda3\\Lib\\site-packages\\requests\\models.py\", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"C:\\Users\\user\\anaconda3\\Lib\\json\\__init__.py\", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"C:\\Users\\user\\anaconda3\\Lib\\json\\decoder.py\", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"C:\\Users\\user\\anaconda3\\Lib\\json\\decoder.py\", line 355, in raw_decode raise JSONDecodeError(\"Expecting value\", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File \"C:\\Users\\user\\anaconda3\\Lib\\site-packages\\jupyter_to_medium\\_bundler.py\", line 37, in upload data = publish(**kwargs) ^^^^^^^^^^^^^^^^^ File \"C:\\Users\\user\\anaconda3\\Lib\\site-packages\\jupyter_to_medium\\_publish_to_medium.py\", line 300, in publish p.main() ^^^^^^^^ File \"C:\\Users\\user\\anaconda3\\Lib\\site-packages\\jupyter_to_medium\\_publish_to_medium.py\", line 216, in main self.author_id = self.get_author_id() ^^^^^^^^^^^^^^^^^^^^ File \"C:\\Users\\user\\anaconda3\\Lib\\site-packages\\jupyter_to_medium\\_publish_to_medium.py\", line 96, in get_author_id return r.json()['data']['id'] ^^^^^^^^ File \"C:\\Users\\user\\anaconda3\\Lib\\site-packages\\requests\\models.py\", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
已按照官方步骤操作,且在家目录配置了集成令牌。
内容的提问来源于stack exchange,提问作者Olumide Olaoye
相关产品推荐
相关产品推荐

