简体   繁体   English

ipython:笔记本似乎不是 JSON

[英]ipython: Notebook does not appear to be JSON

I have recently started working with the ipython notebook.我最近开始使用 ipython notebook。 Have created several test scripts for the same.已经为此创建了几个测试脚本。 On opening one of the files (.ipynb) it gives me an error: " Unreadable Notebook: /home/dev/Feedbacks_exploration.ipynb NotJSONError("Notebook does not appear to be JSON: u''...",) "在打开其中一个文件 (.ipynb) 时,它给了我一个错误:“不可读的笔记本:/home/dev/Feedbacks_exploration.ipynb NotJSONError(“Notebook 似乎不是 JSON: u''...”,)”

This file included fetching data from psql, plotting of a line graph, and a block of markdown.该文件包括从 psql 获取数据、绘制折线图和一段 Markdown。

Can anyone please help guide me hoe to open this file?任何人都可以帮助指导我打开这个文件吗? It has some of the important functions that could be used.它具有一些可以使用的重要功能。

Thanks!!!谢谢!!!

The problem for me was that I had an unresolved merge conflict in my ipython notebook.我的问题是我的 ipython 笔记本中有一个未解决的合并冲突。 So I opened the file and deleted one version ( HEAD>>>>> and what came after it up until ======= and then the line containing <<<<<< ).所以,我打开该文件,并删除了一个版本( HEAD>>>>>和什么来后它,直到=======然后将包含行<<<<<< )。 In short, resolve the merge conflict and you'll be good.简而言之,解决合并冲突,你会好起来的。

I've faced similar problem when I'm using IPython notebook (Jupyter) for H2O.当我将 IPython notebook (Jupyter) 用于 H2O 时,我遇到了类似的问题。 I installed Anaconda Ver 3.X and when i did with Anaconda 2.7.9 it worked without the JSON error.我安装了 Anaconda Ver 3.X,当我使用 Anaconda 2.7.9 时,它没有出现 JSON 错误。 It's because IPython (Jupyter) doesn't yet support for Version 3.X of Anaconda (Python)这是因为 IPython (Jupyter) 尚不支持 Anaconda (Python) 的 3.X 版

I got this error once when I tried to use nbformat to read in several notebooks that I was currently running (including the one from which I ran the nbformat commands).当我尝试使用nbformat读取当前正在运行的多个笔记本(包括我从中运行nbformat命令的笔记本)时,出现了一次此错误。 The error went away the next time I tried loading the notebooks (I might have saved in between) and hasn't occurred again since.下次我尝试加载笔记本时错误消失了(我可能已经在两者之间保存了)并且此后没有再次发生。

I had a similar issue and neen able to solve it in the following way.我有一个类似的问题,并且可以通过以下方式解决它。

It is a bit of quirky solution but it works.这是一个有点古怪的解决方案,但它有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM