Jupyterbook not building with sphinxcontrib-bibtex failure
See original GitHub issueI am unable to build a jupyter book with following error /home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/sphinxcontrib/bibtex/init.py
Steps taken :
- Created a new conda environment
- pip install -r requirements.txt
My requirements.txt
jupyter
jupyter-book
pyreadline
plotly
plotly-express
plotnine
ipympl
altair
vega_datasets
bqplot
seaborn
- jb create tbook
- jb build tbook
- (Others) Tried adding bibtex_bibfiles in _config.yml with no success
(testjb) ubuntu@ip-10-134-194-166:/Landmark2/pdo/Code/ALDAOps/metis$ jb create tbook
===============================================================================
Your book template can be found at
tbook/
===============================================================================
(testjb) ubuntu@ip-10-134-194-166:/Landmark2/pdo/Code/ALDAOps/metis$ jb build tbook Running Jupyter-Book v0.8.3 Source Folder: /Landmark2/pdo/Code/ALDAOps/metis/tbook Config Path: /Landmark2/pdo/Code/ALDAOps/metis/tbook/_config.yml Output Path: /Landmark2/pdo/Code/ALDAOps/metis/tbook/_build/html Running Sphinx v3.3.1 making output directory… done myst v0.12.10: MdParserConfig(renderer=‘sphinx’, commonmark_only=False, dmath_enable=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, amsmath_enable=False, deflist_enable=False, update_mathjax=True, admonition_enable=False, figure_enable=False, disable_syntax=[], html_img_enable=False, url_schemes=[‘mailto’, ‘http’, ‘https’], heading_anchors=None)
Extension error: You must configure the bibtex_bibfiles setting Traceback (most recent call last): File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/jupyter_book/sphinx.py”, line 110, in build_sphinx app = Sphinx( File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/sphinx/application.py”, line 278, in init self._init_builder() File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/sphinx/application.py”, line 337, in _init_builder self.events.emit(‘builder-inited’) File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/sphinx/events.py”, line 110, in emit results.append(listener.handler(self.app, *args)) File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/sphinxcontrib/bibtex/init.py”, line 45, in init_bibtex_cache raise ExtensionError(“You must configure the bibtex_bibfiles setting”) sphinx.errors.ExtensionError: You must configure the bibtex_bibfiles setting
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File “/home/ubuntu/anaconda3/envs/testjb/bin/jb”, line 8, in <module> sys.exit(main()) File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/click/core.py”, line 829, in call return self.main(*args, **kwargs) File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/click/core.py”, line 782, in main rv = self.invoke(ctx) File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/click/core.py”, line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/click/core.py”, line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/click/core.py”, line 610, in invoke return callback(*args, **kwargs) File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/jupyter_book/commands/init.py”, line 259, in build builder_specific_actions( File “/home/ubuntu/anaconda3/envs/testjb/lib/python3.9/site-packages/jupyter_book/commands/init.py”, line 500, in builder_specific_actions raise RuntimeError(_message_box(msg, color=“red”, doprint=False)) from result RuntimeError:
There was an error in building your book. Look above for the cause.
===============================================================================
(testjb) ubuntu@ip-10-134-194-166:/Landmark2/pdo/Code/ALDAOps/metis$
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top GitHub Comments
@choldgraf correct! I’ve just tried it, the
sphinxcontrib-bibtex
version 1.0 works, 2.0 doesn’t (this is installed by default).For the rest of people in the thread:
just add
sphinxcontrib-bibtex==1.0.0
in yourrequirements.txt
Edit:
sphinxcontrib-bibtex<2.0.0
probably more correctArgg - this is because
sphinx-bibtex
just released a major version that’s incompatible. I’ve pinned sphinxcontrib-bibtex to the 1.0 version on the master branch, and we’ll get that into the next JB release. In the meantime just ensure that you havesphinxcontrib-bibtex
1.0 👍