Jupyter Notebook при загрузке файла .ipynb - PullRequest
0 голосов
/ 13 ноября 2018
Unreadable Notebook: /home/gerbil/ws_sim/src/rosie_simulation/analysis/get_stats-multi.ipynb NotJSONError('Notebook does not appear to be JSON: u\'{\\n "cells": [\\n {\\n "cell_type": "...',)

Я получаю эту ошибку при попытке загрузить файл .ipynb, который я открываю с помощью команды jupyter notebook get_stats-multi.ipynb.

{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Welcome to the metrics document! Please press \"Shift+Enter\" in the cell below to get started! *Please note that any output that is truncated can be fully expanded by clicking on the whitespace to the left of it's respective cell, underneath the ln [#]!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "from rosie_analytics_functions import *"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Data Preparation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### If you'd like to see all of your available logs, press \"Shift+Enter\" on the cell below "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
   "scrolled": true
   },
   "outputs": [],
   "source": [
   "!ls ./logs/raw"
   ]
   },
   {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
   "### Please enter the name of the folder where the bags to be processed are located as well as the name of the room it was running in from among (\"IEC\", \"IEC_Multi_Room\", \"IHOS_Section\", or \"IHOS_Section_3_room")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
   "scrolled": true
   },
   "outputs": [],
   "source": [
   "folder_name" = "\"test\" # Leaving this blank processes all files in logs/raw\n",
   "room_name" = "IEC"
   ]
  },
   {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
   "### Please press \"Shift+Enter\" below to generate result data and CSV files (found in analysis/logs/processed)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
   "scrolled": true
   },
   "outputs": [],
   "source": [
   "process_all_bags_in_folder(folder_name, room_name)"
   ]
  },
   {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
   "###    "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
  "display_name": "Python 2",
  "language": "python",
  "name": "python2"
  },
  "language_info": {
  "codemirror_mode": {
  "name": "ipython",
  "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

Вот файл, который я пытаюсь загрузить. Насколько я могу судить, он соответствует синтаксису JSON для файлов, но у меня очень мало опыта с JSON, и я мог упустить что-то маленькое ...

1 Ответ

0 голосов
/ 13 ноября 2018

Начиная с

"### Please ... ... ... or \"IHOS_Section_3_room")"

И заканчивается:

   "folder_name" = "\"test\"

Существуют несоответствующие кавычки, что приводит к непонятному JSON. За исключением других ошибок, исправление этого должно сделать Ноутбук счастливым путешественником.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...