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

Version 0.2.15 breaks build (in case of duplicate domain objects) #142

Closed
abchenson opened this issue Nov 6, 2017 · 8 comments
Closed

Comments

@abchenson
Copy link

Hi -- just tried upgrading to 0.2.15, and a previously working sphinx build now breaks with the following error:

Exception occurred:
File "/home/joe-h/miniconda3/envs/bmll-docs/lib/python3.6/site-packages/nbsphinx.py", line 1099, in apply
title = sig['ids'][0]
IndexError: list index out of range

log
sphinx-err-f73pf565.log
file attached

@tdaff
Copy link

tdaff commented Nov 6, 2017

I see the same thing when building docs for https://github.com/libAtoms/QUIP

sphinx-err-obiNaL.log

tdaff added a commit to libAtoms/QUIP that referenced this issue Nov 6, 2017
Build breaks with nbsphinx==0.2.15 so use a working version.

Track the bug at spatialaudio/nbsphinx#142

Also fix warning from video.py
@cathalmccabe
Copy link

@mgeier
Copy link
Member

mgeier commented Nov 6, 2017

Sorry for the breakage!
This was added in #135, it looks like sometimes the list of IDs in a signature can be empty ...?

@clenk Do you know a way how to fix this?

clenk added a commit to clenk/nbsphinx that referenced this issue Nov 6, 2017
If there are domain objects with the same name in a single document,
Sphinx only creates an anchor tag for the first one, so the 'ids' of the
subsequent ones will be empty. We only need to create a label for the
first one, as the others aren't linkable anyway.

Fixes spatialaudio#142.
@clenk
Copy link
Contributor

clenk commented Nov 6, 2017

Looks like it's caused by duplicate domain objects. For example, the PYNQ error seems to be caused by For example, see http://pynq.readthedocs.io/en/v2.0/pynq_package/pynq.gpio.html - There are 2 versions of index, path, and direction but only the first of each is linkable.

For QUIP, it seems to be caused by multiple diff_min_image here: http://libatoms.github.io/QUIP/atoms.html#quippy.atoms.Atoms.diff_min_image

This isn't a problem with these libraries but a bug in nbsphinx, so I've made a PR to catch/fix this error.

@mgeier
Copy link
Member

mgeier commented Nov 6, 2017

Thanks @clenk for the quick fix!
I'll make a new release tomorrow if nothing else comes up.

@mgeier mgeier changed the title Version 0.2.15 breaks build Version 0.2.15 breaks build (in case of multiple domain objects) Nov 7, 2017
@mgeier
Copy link
Member

mgeier commented Nov 7, 2017

I've just created a new release: https://pypi.python.org/pypi/nbsphinx/0.2.16

@tdaff
Copy link

tdaff commented Nov 7, 2017

Works for me, thanks!

@abchenson
Copy link
Author

thanks -- no more failing builds with 0.2.16

@mgeier mgeier changed the title Version 0.2.15 breaks build (in case of multiple domain objects) Version 0.2.15 breaks build (in case of duplicate domain objects) Nov 10, 2017
mgeier pushed a commit that referenced this issue Feb 3, 2019
If there are domain objects with the same name in a single document,
Sphinx only creates an anchor tag for the first one, so the 'ids' of the
subsequent ones will be empty. We only need to create a label for the
first one, as the others aren't linkable anyway.

Fixes #142.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants