From d265b6fe4411aeb88ad2b46e85feb4aefd5af4a6 Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Fri, 2 Jan 2026 18:41:08 -0800 Subject: [PATCH] Fix Sphinx theme loading by removing invalid import The issue was that conf.py was trying to import sphinx_rtd_theme as a module from the local directory, which doesn't work with modern Sphinx versions. Changes: - Removed: sys.path.insert for sphinx_rtd_theme directory - Removed: import sphinx_rtd_theme (invalid with local theme) - Added: html_theme_path = ["."] to point to local theme directory Now Sphinx will find the local sphinx_rtd_theme/ directory without the problematic import statement that was causing 'no setup() function' error. Error was: 'extension sphinx_rtd_theme has no setup() function' --- docs/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index fb3ffd9..f5bb07c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,8 +14,6 @@ import sys sys.path.insert(0, os.path.abspath(".")) -sys.path.insert(0, os.path.abspath("sphinx_rtd_theme")) -import sphinx_rtd_theme # -- Project information ----------------------------------------------------- @@ -50,6 +48,7 @@ # a list of builtin themes. # html_theme = "sphinx_rtd_theme" +html_theme_path = ["."] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css".