Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: build encountering JSON error in a notebook #52

Closed
sjsrey opened this issue Dec 30, 2018 · 3 comments
Closed

BUG: build encountering JSON error in a notebook #52

sjsrey opened this issue Dec 30, 2018 · 3 comments
Assignees

Comments

@sjsrey
Copy link
Member

sjsrey commented Dec 30, 2018

(pysal-notebooks) src/notebooks - [master●] » python lib/build.py --build
python scripts/generate_book.py
Convert and copy notebook/md files...
 69%|██████████████████████████████████████████████████████▋                        | 36/52 [00:25<00:11,  1.38it/s]Traceback (most recent call last):
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/nbformat/reader.py", line 14, in parse_json
    nb_dict = json.loads(s, **kwargs)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 244 column 1 (char 31035)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "scripts/generate_book.py", line 242, in <module>
    cleaner = NotebookCleaner(tmp_notebook)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/nbclean/clean.py", line 19, in __init__
    self.ntbk = _check_nb_file(ntbk)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/nbclean/utils.py", line 8, in _check_nb_file
    ntbk = nbf.read(ntbk, nbf.NO_CONVERT)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/nbformat/__init__.py", line 139, in read
    return read(f, as_version, **kwargs)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/nbformat/__init__.py", line 141, in read
    return reads(fp.read(), as_version, **kwargs)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/nbformat/__init__.py", line 74, in reads
    nb = reader.reads(s, **kwargs)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/nbformat/reader.py", line 58, in reads
    nb_dict = parse_json(s, **kwargs)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/nbformat/reader.py", line 17, in parse_json
    raise NotJSONError(("Notebook does not appear to be JSON: %r" % s)[:77] + "...")
nbformat.reader.NotJSONError: Notebook does not appear to be JSON: '{\n "cells": [\n  {\n   "cell_type": "c...
Exception ignored in: <function tqdm.__del__ at 0x10be78598>
Traceback (most recent call last):
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/tqdm/_tqdm.py", line 931, in __del__
    self.close()
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/tqdm/_tqdm.py", line 1133, in close
    self._decr_instances(self)
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/tqdm/_tqdm.py", line 496, in _decr_instances
    cls.monitor.exit()
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/site-packages/tqdm/_monitor.py", line 52, in exit
    self.join()
  File "/anaconda3/envs/pysal-notebooks/lib/python3.7/threading.py", line 1029, in join
    raise RuntimeError("cannot join current thread")
RuntimeError: cannot join current thread
make: *** [book] Error 1
@darribas
Copy link
Member

Yes! Sorry forgot to document. This has to do with this issue: pysal/spint#16. Until it's resolved, removing that single notebook (glm_speed.ipynb) should work. Please report back if there're further problems or feel free to close the issue when worked out.

@weikang9009
Copy link
Member

Works great on my mac after deleting glm_speed.ipynb!

@jGaboardi
Copy link
Member

Resolved via pysal/spint#19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants