Skip to content

Cannot import name 'Directive' (class was deprecated) #8

@addisonlynch

Description

@addisonlynch

Sphinx - 1.7.2

After adding the extension to Sphinx:

Extension error:
Could not import extension RunNotebook (exception: cannot import name 'Directive')

It seems the problem is coming from here:

from sphinx.util.compat import Directive

From the Sphinx changelog, it seems that sphinx.util.compat.Directive was deprecated as of the 1.7 release:

1.6b1
sphinx.util.compat.Directive class is now deprecated. Please use instead docutils.parsers.rst.Directive

I did try reverting to 1.6.1, but an encoding error was thrown:

image

Don't have as much time as I'd like to investigate and create a pull at the moment, but will try to take a look at some point. Thanks for writing this library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions