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

nbdev_new: json.decoder.JSONDecodeError: Expecting ',' delimiter: line 19 column 41 (char 323) #1360

Open
stroopwafl opened this issue Jul 19, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@stroopwafl
Copy link

On creating a new nbdev project with the nbdev_new command, after cloning into an empty git repo as described in the tutorial, I get the following error:

Traceback (most recent call last):
File "/home/ndev_env/bin/nbdev_new", line 8, in
sys.exit(nbdev_new())
File "/home/ndev_env/lib/python3.9/site-packages/fastcore/script.py", line 119, in _f
return tfunc(**merge(args, args_from_prog(func, xtra)))
File "/home/ndev_env/lib/python3.9/site-packages/nbdev/cli.py", line 108, in nbdev_new
nbdev_export.wrapped()
File "/home/ndev_env/lib/python3.9/site-packages/nbdev/doclinks.py", line 134, in nbdev_export
for f in files: nb_export(f)
File "/home/ndev_env/lib/python3.9/site-packages/nbdev/export.py", line 48, in nb_export
nb = NBProcessor(nbname, [exp]+L(procs), debug=debug)
File "/home/ndev_env/lib/python3.9/site-packages/nbdev/process.py", line 92, in init
self.nb = read_nb(path) if nb is None else nb
File "/home/ndev_env/lib/python3.9/site-packages/execnb/nbio.py", line 57, in read_nb
res = dict2nb(_read_json(path, encoding='utf-8'))
File "/home/ndev_env/lib/python3.9/site-packages/execnb/nbio.py", line 16, in _read_json
return loads(Path(self).read_text(encoding=encoding, errors=errors))
File "/home/ndev_env/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/home/ndev_env/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/ndev_env/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 19 column 41 (char 323)

The same error gets triggered when I try to export any notebooks within this project using the nbdev_export command. I saw this issue, but changing the python encoding environment variable doesn't work for me. I am running Linux.

Here is a link to the GitHub action for the failed test upon commit.

Has anyone seen or solved this before?

@stroopwafl stroopwafl added the bug Something isn't working label Jul 19, 2023
@nicole-brewer
Copy link

I had this problem also. I used the solution provided in #1278 . My problem was that my description contains double quotes and my solution was to delete the files generated by nbdev_new and run nbdev_new again, this time without the use of any quotes in the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants