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

AttributeError: 'bool' object has no attribute 'split' when arg is False in sphinx.ext.autodoc:members_option() in graphql-core #8143

Closed
hroncok opened this issue Aug 21, 2020 · 5 comments

Comments

@hroncok
Copy link
Contributor

hroncok commented Aug 21, 2020

Describe the bug
When I attempt to build the documentation of graphql-python/graphql-core (commit 9d9b465, which is the most recent one in master today) I get the following error ith Sphinx 3.2.1:

Exception occurred:
  File ".../graphql-core/.tox/docs/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 98, in members_option
    return [x.strip() for x in arg.split(',') if x.strip()]
AttributeError: 'bool' object has no attribute 'split'

To Reproduce
Steps to reproduce the behavior:

$ git clone https://github.com/graphql-python/graphql-core
$ cd graphql-core
$ git switch -d 9d9b465
$ sed -i 's/sphinx>=2.4,<3/sphinx>=3.2/' tox.ini
$ tox -e docs
...
Running Sphinx v3.2.1
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 23 source files that are out of date
updating environment: [new config] 23 added, 0 changed, 0 removed
reading sources... [  4%] diffs
reading sources... [  8%] index
reading sources... [ 13%] intro
reading sources... [ 17%] modules/error

Exception occurred:
  File ".../graphql-core/.tox/docs/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 97, in members_option
    return [x.strip() for x in arg.split(',') if x.strip()]
AttributeError: 'bool' object has no attribute 'split'
The full traceback has been saved in /tmp/sphinx-err-wxxmynxh.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

Expected behavior
This used to work before (with Sphinx 3.1) and now it no longer works. I don't know where is the False value coming from.
I expect the documentation to be generated.

Your project
https://github.com/graphql-python/graphql-core

Environment info

  • OS: Linux (Fedora)
  • Python version: 3.8.5, 3.9.0rc1
  • Sphinx version: 3.2.1
  • Sphinx extensions: sphinx.ext.autodoc

Additional context
We've updated Sphinx in Fedora from 3.1.2 to 3.2.1 and this is the only package that fails to build with the new version.

Full traceback attached: log.txt

@tk0miya
Copy link
Member

tk0miya commented Aug 21, 2020

I confirmed the error with this setting:

autodoc_default_options = {
    'private-members': False,
}

Why did you set False value to this?

@hroncok
Copy link
Contributor Author

hroncok commented Aug 21, 2020

Why did you set False value to this?

I haven't. I don't know where it is coming from. The conf has:

autodoc_default_options = {
    'members': True,
    'inherited-members': True,
    'private-members': False,
    'special-members': '__init__',
    'undoc-members': True,
    'show-inheritance': True
}

@tk0miya tk0miya added this to the 3.3.0 milestone Aug 21, 2020
@hroncok
Copy link
Contributor Author

hroncok commented Aug 21, 2020

Oh. Sorry, I've read it wrong. So it is private-members.

@tk0miya
Copy link
Member

tk0miya commented Aug 21, 2020

I posted #8144 to ignore private-members: False entry. I don't know how this is worthy. But it will help you.

@hroncok
Copy link
Contributor Author

hroncok commented Aug 21, 2020

I don't know how this is worthy

I think it is. It helps, yes, thank you.

tk0miya added a commit that referenced this issue Aug 29, 2020
Fix #8143: AttributeError if autodoc_default_options contains False
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants