gpt4 book ai didi

python - Jupyter Notebook 加载 .ipynb 文件时出错

转载 作者:太空宇宙 更新时间:2023-11-03 21:35:09 34 4
gpt4 key购买 nike

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": "...',)

尝试加载使用命令 jupyter Notebook get_stats-multi.ipynb 打开的 .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 的经验很少,我可能会遗漏一些小东西......

最佳答案

开始于

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

结尾为:

   "folder_name" = "\"test\"

引号不匹配,导致 JSON 无法解释。除非出现其他错误,解决这个问题应该会让笔记本电脑成为一个快乐的露营者。

关于python - Jupyter Notebook 加载 .ipynb 文件时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53284084/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com