ipython / ipython/ipython

nbconvert json decoding error

Abierto
#10,844 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
16.8k
Forks
4.5k
Merge medio
1 d 2 h
PR fusionados (30 d)
6

Descripción

I believe this error might be related to #8009. I've managed to get the hooks in #8009 to work (somewhat) producing desired `.py` and `.html` files after a checkpoint. However, I am getting a `ValueError: No JSON object could be decoded` having to do with my nb config `.json` file that I don't really understand. Any ideas what I am doing wrong here?

`sys.info` returns:

> {'commit_hash': u'5a894b9',
> 'commit_source': 'installation',
> 'default_encoding': 'UTF-8',
> 'ipython_path': '/home/ktavabi/miniconda3/envs/andrea-anders/lib/python2.7/site-packages/IPython',
> 'ipython_version': '5.3.0',
> 'os_name': 'posix',
> 'platform': 'Linux-4.4.0-96-generic-x86_64-with-debian-stretch-sid',
> 'sys_executable': '/home/ktavabi/miniconda3/envs/andrea-anders/bin/python',
> 'sys_platform': 'linux2',
> 'sys_version': '2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]'}

I am working in a conda virtual env with following packages:

> jupyter 1.0.0
> jupyter_client 5.1.0
> jupyter_console 5.1.0
> jupyter_core 4.3.0
> nbconvert 5.2.1
> nbformat 4.4.0

My `jupyter_nbconvert_config.json` file looks like:
```json
{
"Exporter": {
"template_path": [
".",
"/home/ktavabi/.jupyter/templates"
],
"preprocessors": [
"jupyter_contrib_nbextensions.nbconvert_support.CodeFoldingPreprocessor",
"jupyter_contrib_nbextensions.nbconvert_support.PyMarkdownPreprocessor"
]
},
"version": 1
}
```
I get the following error in the console:

> [NbConvertApp] ERROR | Exception while loading config file /home/ktavabi/.jupyter/jupyter_nbconvert_config.json
> Traceback (most recent call last):
> File "/home/ktavabi/miniconda3/envs/andrea-anders/lib/python2.7/site-packages/traitlets/config/application.py", line 562, in _load_config_files
> config = loader.load_config()
> File "/home/ktavabi/miniconda3/envs/andrea-anders/lib/python2.7/site-packages/traitlets/config/loader.py", line 406, in load_config
> dct = self._read_file_as_dict()
> File "/home/ktavabi/miniconda3/envs/andrea-anders/lib/python2.7/site-packages/traitlets/config/loader.py", line 412, in _read_file_as_dict
> return json.load(f)
> File "/home/ktavabi/miniconda3/envs/andrea-anders/lib/python2.7/json/__init__.py", line 291, in load
> **kw)
> File "/home/ktavabi/miniconda3/envs/andrea-anders/lib/python2.7/json/__init__.py", line 339, in loads
> return _default_decoder.decode(s)
> File "/home/ktavabi/miniconda3/envs/andrea-anders/lib/python2.7/json/decoder.py", line 364, in decode
> obj, end = self.raw_decode(s, idx=_w(s, 0).end())
> File "/home/ktavabi/miniconda3/envs/andrea-anders/lib/python2.7/json/decoder.py", line 382, in raw_decode
> raise ValueError("No JSON object could be decoded")
> ValueError: No JSON object could be decoded

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.