question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jupyterbook not building with sphinxcontrib-bibtex failure

See original GitHub issue

I 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 :

  1. Created a new conda environment
  2. pip install -r requirements.txt

My requirements.txt

jupyter
jupyter-book
pyreadline
plotly
plotly-express
plotnine
ipympl
altair
vega_datasets
bqplot
seaborn
  1. jb create tbook
  2. jb build tbook
  3. (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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

26reactions
partmorcommented, Dec 14, 2020

Argg - 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 have sphinxcontrib-bibtex 1.0 👍

@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 your requirements.txt

Edit: sphinxcontrib-bibtex<2.0.0 probably more correct

15reactions
choldgrafcommented, Dec 13, 2020

Argg - 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 have sphinxcontrib-bibtex 1.0 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

executablebooks/jupyter-book - Support ReadTheDocs - GitHub
Make sure there are no edge-cases that make it unstable for RTD; Get RTD to support the build command of Jupyter Book (...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found