swyddfa / esbonio

A language server for working with Sphinx projects.
https://docs.esbon.io/
135 stars 22 forks source link

sphinx.errors.ThemeError: no theme named 'sphinx_rtd_theme' found (missing theme.toml?) #923

Open alexanderilyin opened 1 week ago

alexanderilyin commented 1 week ago

Expected behavior

Live Preview works.

Actual behavior

Live Preview does not work.

Log output

Running Sphinx v8.1.3
loading translations [en]...
done
Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
[esbonio.lsp] Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/esbonio/lsp/sphinx/__init__.py", line 152, in _initialize_sphinx
    return self.create_sphinx_app(self.user_config)  # type: ignore
  File "/home/vscode/.local/lib/python3.10/site-packages/esbonio/lsp/sphinx/__init__.py", line 343, in create_sphinx_app
    app = Sphinx(**self.sphinx_args)
  File "/home/vscode/.local/lib/python3.10/site-packages/sphinx/application.py", line 295, in __init__
    self._init_builder()
  File "/home/vscode/.local/lib/python3.10/site-packages/sphinx/application.py", line 368, in _init_builder
    self.builder.init()
  File "/home/vscode/.local/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 170, in init
    self.init_templates()
  File "/home/vscode/.local/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 224, in init_templates
    self.theme = theme_factory.create(theme_name)
  File "/home/vscode/.local/lib/python3.10/site-packages/sphinx/theming.py", line 236, in create
    raise ThemeError(__('no theme named %r found (missing theme.toml?)') % name)
sphinx.errors.ThemeError: no theme named 'sphinx_rtd_theme' found (missing theme.toml?)


### (Optional) Settings from conf.py

_No response_
alexanderilyin commented 1 week ago

Okay, so far it looks like problems with deps / settings on my side, looking.

alexanderilyin commented 1 week ago

I got this far, it happens when I try to open live preview:

[esbonio.lsp] Getting initial doctree for: '/workspaces/partcad/docs/source/development.rst'
Cancel notification for unknown message id "3"
Cancel notification for unknown message id "4"
stamina.retry_scheduled
stamina.retry_scheduled
stamina.retry_scheduled
[client] Ignoring file:///workspaces/partcad/docs/source/development.rst
[client] HTML Path 'undefined'
[client] Ignoring output:extension-output-swyddfa.esbonio-%231-Esbonio
stamina.retry_scheduled
alcarney commented 1 week ago
[client] Ignoring file:///workspaces/partcad/docs/source/development.rst
[client] HTML Path 'undefined'

Looks like the extension wasn't able to find the html file that corresponds to your development.rst file - has the extension managed to do a complete build?

It's been a while since I've used the 0.11.0 version, there's a chance you need edit a file and save it to start one going.

alexanderilyin commented 1 week ago

Nope, but I later learned that there were some other problems in my env, and docs were not building from CLI. I fixed that but not yet tried VS Code Extension after that, should come back to that in few days and report back.