sphinx-gallery: BUG Check "backreferences_dir" is str or None

All builds for PyVista’s docs are failing on the CIs with the new v0.5.0 of sphinx-gallery. I confirmed this locally by upgrading sphinx-gallery and get the following error (from https://github.com/pyvista/pyvista/pull/451#issuecomment-555255085)

I’m not sure exactly where this error is coming from… seems to be only when using PyVsita’s scraper - can you all help me track this down?

# Sphinx version: 2.2.1
# Python version: 3.7.3 (CPython)
# Docutils version: 0.15.2 release
# Jinja2 version: 2.10.3
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/site-packages/sphinx/cmd/build.py", line 275, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/site-packages/sphinx/application.py", line 269, in __init__
    self._init_builder()
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/site-packages/sphinx/application.py", line 330, in _init_builder
    self.events.emit('builder-inited')
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/site-packages/sphinx/events.py", line 103, in emit
    results.append(callback(self.app, *args))
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/site-packages/sphinx_gallery/gen_gallery.py", line 284, in generate_gallery_rst
    seen_backrefs)
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/site-packages/sphinx_gallery/gen_rst.py", line 328, in generate_dir_rst
    fname, target_dir, src_dir, gallery_conf, seen_backrefs)
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/site-packages/sphinx_gallery/gen_rst.py", line 777, in generate_file_rst
    fname, intro)
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/site-packages/sphinx_gallery/backreferences.py", line 248, in _write_backreferences
    '%s.examples.new' % backref)
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/Users/bane/anaconda3/envs/foo/lib/python3.7/genericpath.py", line 149, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'bool'

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

I would say error, it’s less likely to be missed/ignored

TL;DR: "backreferences_dir": None in pyvista/docs/conf.py should solve this @banesullivan

@GuillaumeFavelier @lucyleeow the fastest way to debug might be to start a Sphinx build in Python space. That way you can hit the error and post-mortem debug with import pdb; pdb.pm(). Something like this set of lines should hopefully allow you to replicate the error:

https://github.com/sphinx-gallery/sphinx-gallery/blob/master/sphinx_gallery/tests/test_full.py#L50-L56

I’m down, let’s find out what’s happening here.

I don’t think the Scraper API changed. It is an unusual error. I’ll work with @GuillaumeFavelier about this today (if he’s in).