Skip to content

Prerelease can't find installed extensions #984

@Gliptal

Description

@Gliptal

esbonio (python module): 1.0.0b11
esbonio (vscode extension): 0.96.4

I can't get Esbonio to pick up all of the sphinx extensions and themes defined in the conf.py, even though they appear to be installed in the configured Python interpreter.

I'm using a devcontainer configured to run a docker image that (among other things) installs a number of sphinx Python modules:

# Just a snippet of a longer list
RUN pip install --break-system-packages -U sphinx \       
        sphinx-book-theme \
        sphinx-fontawesome \
        sphinxcontrib-matlabdomain \
        sphinxcontrib-mermaid \
        sphinxcontrib-bibtex \

RUN pip install --break-system-packages -U --pre esbonio

Inside the devcontainer, if I run pip list I can see the following modules are installed (among others):

sphinx_fontawesome            0.0.6
sphinx-book-theme             1.1.4
sphinxcontrib-mermaid         1.0.0

For some reason, Esbonio can't find those three modules:

  • the conf.py has Could not import extension and no theme named errors;
  • the preview fallbacks to the alabaster theme, and raises a warning on any usage of the mermaid directive.

This is an excerpt of the output log in VSCode:

...
ThemeError: no theme named 'sphinx_book_theme' found (missing theme.toml?)
Retrying with html_theme = 'alabaster'
...
/path/to/file/file.md:116: WARNING: Unknown directive type: 'mermaid' [myst.directive_unknown]

Could esbonio be using its fallback env? If that's the case, how do I get it to pick up the env configured in VSCode (that in the devcontainer case is in /usr/bin/python)?

[esbonio.Configuration] ConfigChangeEvent(scope='file:///workspaces/planning', value=SphinxConfig(enable_dev_tools=False, python_command=[], build_command=[], config_overrides={}, env_passthrough=[], cwd='/workspaces/planning', fallback_env='/root/.vscode-server/extensions/swyddfa.esbonio-0.96.4/bundled/env', python_path=[]), previous=None)

Note that the documentation builds correctly with make html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions