Skip to content

v0.5.0: 'ArgParseDirective' object has no attribute 'config' #56

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

Closed
njzjz opened this issue Jul 15, 2024 · 3 comments
Closed

v0.5.0: 'ArgParseDirective' object has no attribute 'config' #56

njzjz opened this issue Jul 15, 2024 · 3 comments

Comments

@njzjz
Copy link

njzjz commented Jul 15, 2024

I am unsure what's wrong here, but the same configuration worked several hours ago. So I guess the new version breaks it.

RTD log: https://readthedocs.org/projects/deepmd/builds/25009667/

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/cmd/build.py", line 337, in build_main
    app.build(args.force_all, args.filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/application.py", line 378, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/builders/__init__.py", line 297, in build_update
    self.build(to_build,
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/builders/__init__.py", line 318, in build
    updated_docnames = set(self.read())
                           ^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/builders/__init__.py", line 425, in read
    self._read_serial(docnames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/builders/__init__.py", line 477, in _read_serial
    self.read_doc(docname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/builders/__init__.py", line 536, in read_doc
    publisher.publish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/core.py", line 234, in publish
    self.document = self.reader.read(self.source, self.parser,
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/io.py", line 106, in read
    self.parse()
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/readers/__init__.py", line 76, in parse
    self.parser.parse(self.input, document)
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinx/parsers.py", line 83, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 169, in run
    results = StateMachineWS.run(self, input_lines, input_offset,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/statemachine.py", line 233, in run
    context, next_state, result = self.check_line(
                                  ^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2785, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 325, in section
    self.new_subsection(title, lineno, messages)
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection
    newabsoffset = self.nested_parse(
                   ^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
    state_machine.run(block, input_offset, memo=self.memo,
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/statemachine.py", line 233, in run
    context, next_state, result = self.check_line(
                                  ^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2355, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
    return method(self, expmatch)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2104, in directive
    return self.run_directive(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2154, in run_directive
    result = directive_instance.run()
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinxarg/ext.py", line 509, in run
    with mock(self.config.autodoc_mock_imports):
              ^^^^^^^^^^^
AttributeError: 'ArgParseDirective' object has no attribute 'config'

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/envs/3980/lib/python3.11/site-packages/sphinxarg/ext.py", line 509, in run
    with mock(self.config.autodoc_mock_imports):
              ^^^^^^^^^^^
AttributeError: 'ArgParseDirective' object has no attribute 'config'
The full traceback has been saved in /tmp/sphinx-err-gys2ugei.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!
lukpueh added a commit to lukpueh/in-toto that referenced this issue Jul 16, 2024
Constrains docs dependency to fix failing docs build after recent
sphinx-argparse release. see sphinx-doc/sphinx-argparse#56.

(h/t @njzjz for reporting)

The constraint may be removed when the issue is fixed.

Signed-off-by: Lukas Puehringer <[email protected]>
mathdugre added a commit to mathdugre/nipoppy that referenced this issue Jul 16, 2024
@dkuegler
Copy link

Same issue. Same sphinx doc ran no problem just recently, but now fails.

https://github.com/Deep-MI/FastSurfer/actions/runs/9960774303/job/27520785409

BrianJKoopman added a commit to simonsobs/socs that referenced this issue Jul 16, 2024
Release v0.5.0 introduced a bug with the use of autodoc_mock_imports [1].

[1] - sphinx-doc/sphinx-argparse#56
BrianJKoopman added a commit to simonsobs/socs that referenced this issue Jul 16, 2024
Release v0.5.0 introduced a bug with the use of autodoc_mock_imports [1].

[1] - sphinx-doc/sphinx-argparse#56
effigies added a commit to nipreps/fmriprep that referenced this issue Jul 16, 2024
* sphinx-argparse v0.5.0 broke our builds, so blacklist:
sphinx-doc/sphinx-argparse#56
* Backport some fixes from #3312.
njzjz-bot added a commit to njzjz-bot/deepmd-kit that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz-bot added a commit to njzjz-bot/dpdata that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz-bot added a commit to njzjz-bot/dpgen that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz-bot added a commit to njzjz-bot/reacnetgenerator that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz-bot added a commit to njzjz-bot/dargs that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz-bot added a commit to njzjz-bot/dpdispatcher that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz-bot added a commit to njzjz-bot/qiuwenbot that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz-bot added a commit to njzjz-bot/dpgen2 that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz-bot added a commit to njzjz-bot/dpti that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz pushed a commit to njzjz/qiuwenbot that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz pushed a commit to deepmodeling/dargs that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz pushed a commit to deepmodeling/dpgen2 that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
github-merge-queue bot pushed a commit to deepmodeling/reacnetgenerator that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz pushed a commit to deepmodeling/dpgen that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz pushed a commit to deepmodeling/dpti that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
njzjz pushed a commit to deepmodeling/dpdispatcher that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.
github-merge-queue bot pushed a commit to deepmodeling/deepmd-kit that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated `sphinx-argparse` dependency to ensure compatibility by
restricting it to versions below `0.5.0`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
njzjz pushed a commit to deepmodeling/dpdata that referenced this issue Jul 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated `sphinx-argparse` dependency version to `<0.5.0` to ensure
compatibility.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@AA-Turner
Copy link
Member

Fixed in 11bfc2b; sorry.

A

@AA-Turner
Copy link
Member

I have released sphinx-argparse v0.5.1 with a fix.

A

mathdugre added a commit to nipoppy/nipoppy that referenced this issue Jul 25, 2024
* [ENH] [REFACTOR] imports to improve performance of the cli.

* [FIX] type annotation.

* [ENH] lazy import to improve cli performance.

* [FIX] `sphinxarg.ext` release `0.5.0` breaks doc build.

Issue described at sphinx-doc/sphinx-argparse#56

* [UPDATE] dependency requirement for sphinx-argparse.
david-roper pushed a commit to david-roper/nipoppy that referenced this issue Aug 19, 2024
)

* [ENH] [REFACTOR] imports to improve performance of the cli.

* [FIX] type annotation.

* [ENH] lazy import to improve cli performance.

* [FIX] `sphinxarg.ext` release `0.5.0` breaks doc build.

Issue described at sphinx-doc/sphinx-argparse#56

* [UPDATE] dependency requirement for sphinx-argparse.
njzjz pushed a commit to njzjz/deepmd-kit that referenced this issue Sep 16, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated `sphinx-argparse` dependency to ensure compatibility by
restricting it to versions below `0.5.0`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
njzjz pushed a commit to deepmodeling/deepmd-kit that referenced this issue Sep 17, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated `sphinx-argparse` dependency to ensure compatibility by
restricting it to versions below `0.5.0`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
mtaillefumier pushed a commit to mtaillefumier/deepmd-kit that referenced this issue Sep 18, 2024
Pin sphinx-argparse to <0.5.0 due to sphinx-doc/sphinx-argparse#56.

Generated by the task: njzjz-bot/njzjz-bot#7.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated `sphinx-argparse` dependency to ensure compatibility by
restricting it to versions below `0.5.0`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
felix5572 pushed a commit to felix5572/dpti that referenced this issue Mar 16, 2025
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

3 participants