Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with sphinx 5.1 #123

Closed
cvvergara opened this issue Jul 26, 2022 · 2 comments
Closed

Error with sphinx 5.1 #123

cvvergara opened this issue Jul 26, 2022 · 2 comments
Labels
bug Something isn't working question Further information is requested

Comments

@cvvergara
Copy link

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
@attakei
Copy link
Owner

attakei commented Jul 31, 2022

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: sphinx-doc/sphinx#10702

@attakei attakei added question Further information is requested bug Something isn't working labels Jul 31, 2022
attakei added a commit that referenced this issue Aug 1, 2022
Initialize of builder classes support create_builder for Sphinx 5.x and later

Refs: #123
Refs: sphinx-doc/sphinx#10702
@attakei
Copy link
Owner

attakei commented Aug 2, 2022

This is fixed by v2.0.1. Please update.

@attakei attakei closed this as completed Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants