You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I regularly have exported PDF using rst2pdf in the past few months. I upgraded Sphinx from 2.3 to 2.4.1. Since then, the following command no longer works:
sphinx-build -b pdf /home/sarah/sphinxProject/source/ /home/sarah/sphinxProject/build/
Expected behavior. A PDF file shall be created under the build directory.
Actual behavior. I get the following error instead:
Traceback (most recent call last):
File "/home/sarah/sphinxProject/env/lib64/python3.6/site-packages/rst2pdf/pdfbuilder.py", line 216, in assemble_doctree
self.env.indexentries={docname:self.env.indexentries[docname+'-gen']}
KeyError: 'index-gen'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sarah/sphinxProject/env/lib64/python3.6/site-packages/rst2pdf/pdfbuilder.py", line 141, in write
appendices=opts.get('pdf_appendices', self.config.pdf_appendices) or [])
File "/home/sarah/sphinxProject/env/lib64/python3.6/site-packages/rst2pdf/pdfbuilder.py", line 218, in assemble_doctree
self.env.indexentries={}
AttributeError: can't set attribute
FAILED
build succeeded.
I created a new Sphinx 2.4.1 environment and I was able to reproduce the same issue.
To Reproduce
$ mkdir sphinxTest
$ cd sphinxTest
$ python3 -m pip install --user virtualenv
$ pip install --user --upgrade pip
$ python3 -m venv env
$ source ./env/bin/activate
(env) pip install --upgrade pip
(env) pip install -U sphinx
(env) sphinx-quickstart
(env) make html # Confirmed the HTML version was created with no issues.
(env) pip install rst2pdf
(env) vi ./source/conf.py
(env) sphinx-build -b pdf ./source/ ./build/
Running Sphinx v2.4.1
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [pdf]: targets for 1 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing testRst2Pdf...
index
[ERROR] pdfbuilder.py:149 can't set attribute
Traceback (most recent call last):
File "/home/sarah/sphinxTest/env/lib64/python3.6/site-packages/rst2pdf/pdfbuilder.py", line 216, in assemble_doctree
self.env.indexentries={docname:self.env.indexentries[docname+'-gen']}
KeyError: 'index-gen'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sarah/sphinxTest/env/lib64/python3.6/site-packages/rst2pdf/pdfbuilder.py", line 141, in write
appendices=opts.get('pdf_appendices', self.config.pdf_appendices) or [])
File "/home/sarah/sphinxTest/env/lib64/python3.6/site-packages/rst2pdf/pdfbuilder.py", line 218, in assemble_doctree
self.env.indexentries={}
AttributeError: can't set attribute
FAILED
build succeeded.
(env)
Expected behavior
A PDF file should be created under the output target (build).
Your project
N/A
Screenshots
N/A
Environment info
OS: Linux centos 3.10.0-1062.12.1 x86_64
Python version: 3.6.8
Sphinx version: 2.4.1
Sphinx extensions: ['rst2pdf.pdfbuilder']
Extra tools: N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Describe the bug
I regularly have exported PDF using rst2pdf in the past few months. I upgraded Sphinx from 2.3 to 2.4.1. Since then, the following command no longer works:
Expected behavior. A PDF file shall be created under the
build
directory.Actual behavior. I get the following error instead:
I created a new Sphinx 2.4.1 environment and I was able to reproduce the same issue.
To Reproduce
Add the lines in {{./source/conf.py}}
Save it and go back to the shell.
Expected behavior
A PDF file should be created under the output target (build).
Your project
N/A
Screenshots
N/A
Environment info
Additional context
N/A
The text was updated successfully, but these errors were encountered: