转自 :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在浏览器打开即可,结果如下图