轉自 :https://www.cnblogs.com/brooksj/p/10301444.html
描述:之前在公號看到一篇文章,文中有大量代碼,處於對知識的渴求(其實是懶),想要自己跑一遍。作者將代碼上傳至github,而代碼文件后綴為ipynb。本來要用自己的jupyter打開,但總是提示如下錯誤:
Unreadable Notebook: D:\file_saving\mooc_learning\plotly_express\Plotly-Express-Introducing.ipynb NotJSONError("Notebook does not appear to be JSON: '\\n\\n\\n\\n\\n\\n<!DOCTYPE html>\\n<html lang...",)
這個對於我一個編程初期愛好者來說,不算事,秉持遇山開路的大無畏精神,我用notepad++打開文件一探究竟,如下圖所示,果斷放棄!!!
解決方法如下:
step1:找到ipynb文件在github上的url https://github.com/liyangbit/PyDataRoad/blob/master/comprehensive/Plotly-Express-Introducing/Plotly-Express-Introducing.ipynb
step2: 截取上面URL中github.com之后的部分,這里指liyangbit/PyDataRoad/blob/master/comprehensive/Plotly-Express-Introducing/Plotly-Express-Introducing.ipynb,然后將其與http://nbviewer.ipython.org拼接組成新的URL,即http://nbviewer.ipython.org/liyangbit/PyDataRoad/blob/master/comprehensive/Plotly-Express-Introducing/Plotly-Express-Introducing.ipynb,將新的UL在瀏覽器打開即可,結果如下圖