spatialaudio / nbsphinx

:ledger: Sphinx source parser for Jupyter notebooks
https://nbsphinx.readthedocs.io/
MIT License
457 stars 130 forks source link

AttributeError: module 'nbconvert.preprocessors.execute' has no attribute 'CellExecutionError' #466

Closed nilswagner closed 4 years ago

nilswagner commented 4 years ago

How can I resolve the following issue?

nbsphinx/src/nbsphinx.py", line 995, in parse except nbconvert.preprocessors.execute.CellExecutionError as e: AttributeError: module 'nbconvert.preprocessors.execute' has no attribute 'CellExecutionError'

mgeier commented 4 years ago

Are you using a pre-release version of nbconvert?

See also https://github.com/jupyter/nbconvert/issues/1237.

nilswagner commented 4 years ago

nbconvert.version '6.0.0a3'

mgeier commented 4 years ago

Possible work-arounds:

I cannot properly fix this yet in nbsphinx, because the nbconvert people might still make further breaking changes before nbconvert version 6 is released, see https://github.com/jupyter/nbconvert/issues/1237.

As a temporary measure, I could restrict nbconvert to <6 in the nbsphinx dependencies, but I'm not sure that's the right thing to do. What do you think?

mgeier commented 4 years ago

This has been fixed in nbconvert in the meantime.

HealthyPear commented 10 months ago

I am getting this exact error but from a sphinx build

Sphinx parallel build error:
AttributeError: module 'nbconvert.preprocessors.execute' has no attribute 'CellExecutionError'

I am using

nbconvert                 7.13.0             pyhd8ed1ab_0    conda-forge
nbconvert-core            7.13.0             pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.13.0             pyhd8ed1ab_0    conda-forge
nbsphinx                  0.9.3              pyhd8ed1ab_0    conda-forge

both seem to be at the latest release

Let me know if you'd prefer I open a new issue

HealthyPear commented 10 months ago

from a python prompt this works

from nbconvert.preprocessors import CellExecutionError

but this doesn't

from nbconvert.preprocessors.execute import CellExecutionError

as the error indeed reports

HealthyPear commented 10 months ago

see #772

mgeier commented 10 months ago

This seems to have been removed in https://github.com/jupyter/nbconvert/pull/2079, maybe unintentionally.

But since there has been a new nbconvert release since, I guess we should fix it. Thanks for providing the fix in #772!

mgeier commented 10 months ago

A new patch-release of nbconvert has just been released, which should fix this again.

I think we should still change the import on our side.