'NoneType' object has no attribute 'argv' error with clean notebook
On a clean notebook with nbsphinx_execute = 'auto', running the notebook fails with the following error:
python -m sphinx -b html docs docs/_build
Running Sphinx v1.7.9
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] examples/minibatch_iterator
Notebook error:
AttributeError in examples/minibatch_iterator.ipynb:
'NoneType' object has no attribute 'argv'
(venv3)
I'm trying to use nbsphinx on https://github.com/nlgranger/SeqTools (improved_doc branch) on a clean python 3 virtual env with the packages IPython, ipykernel, nbsphinx, Pillow and the project itself.
Is it possible that this is just an error in your notebook? Can you please try to provide a minimal example notebook (with no additional dependencies) that shows this error?
Sure, here is a self contained mini project, I'm trying to build the doc with python -m sphinx docs docs/_build: test.zip
Thanks for the mini example. I cannot reproduce your error. It runs successful except for this unrelated warning:
WARNING: toctree contains reference to document 'test' that doesn't have a title: no link will be generated
Could you try running your notebook with nbconvert --execute?
If you mean jupyter nbconvert --execute it works without issues.
I also have the error with a python 3.5 conda environment, can't make much sense out of it...
Can this be related to nbconvert 5.4 and https://github.com/jupyter/nbconvert/issues/878?
@Juanlu001 Yes it is.
@nlgranger Thanks for checking!
If you mean
jupyter nbconvert --executeit works without issues.
I meant python3 -m nbconvert --execute, but that does the same thing.
This has been fixed in https://github.com/jupyter/nbconvert/pull/924.
Now, we just have to wait for a new nbconvert release (most likely version 5.5).