sphinx-revealjs icon indicating copy to clipboard operation
sphinx-revealjs copied to clipboard

Error with sphinx 5.1

Open cvvergara opened this issue 2 years ago • 2 comments

When generating a presentation. This does not happen with sphinx 4.3.2 and docutils 0.17

the error message:

# Sphinx version: 5.1.0                                                                                                 
# Python version: 3.8.10 (CPython)                                                                                      
# Docutils version: 0.19                                                                                                
# Jinja2 version: 3.0.2                                                                                                 
# Last messages:                                                                                                        
                                                                                                                        
# Loaded extensions:                                                                                                    
Traceback (most recent call last):                                                                                      
  File "/path/to/py-env/lib/python3.8/site-packages/sphinx/registry.py", line 162, in create_builder
    return self.builders[name](app, env)                                                                                
TypeError: __init__() takes 2 positional arguments but 3 were given                                                     
                                                                                                                        
During handling of the above exception, another exception occurred:                                                     
                                                                                                                        
Traceback (most recent call last):                                                                                      
  File "/path/to/py-env/lib/python3.8/site-packages/sphinx/cmd/build.py", line 272, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,                                                          
  File "path/to/py-env/lib/python3.8/site-packages/sphinx/application.py", line 255, in __init__
    self.builder = self.create_builder(buildername)                                                                     
  File "path/to/py-env/lib/python3.8/site-packages/sphinx/application.py", line 328, in create_builder
    return self.registry.create_builder(self, name, self.env)                                                           
  File "path/to/py-env/lib/python3.8/site-packages/sphinx/registry.py", line 169, in create_builder
    builder = self.builders[name](app, env=...)  # type: ignore[arg-type]                                               
TypeError: __init__() got an unexpected keyword argument 'env'

Project where its been used: https://github.com/OSGeo/OSGeoLive-doc

How to reproduce this problem:

git clone -b master --single-branch https://github.com/OSGeo/OSGeoLive-doc
# requirements have sphinx-revealjs and sphinx==4.3.2
pip install -r requirements.txt
# update to newer version of sphinx
pip install sphinx==5.1.0

cd OSGeoLive-doc
# building the presentation
mkdir build
cd build/ 
cmake -DHTML=ON ..
make presentation-html-en

cvvergara avatar Jul 26 '22 21:07 cvvergara

This is problem of sphinx-revealjs, but occurs for only sphinx core v5.1.0. I will fix source lately, but use sphinx v5.1.1 as quickly workaround.

Ref: https://github.com/sphinx-doc/sphinx/pull/10702

attakei avatar Jul 31 '22 10:07 attakei

This is fixed by v2.0.1. Please update.

attakei avatar Aug 02 '22 14:08 attakei