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

[BUG]when I followed Contributing guildline ,found scripts/generate_release_notes.py:82: error: Module has no attribute "BooleanOptionalAction" [attr-defined] #1603

Closed
peter-ni-noob opened this issue Dec 22, 2023 · 5 comments

Comments

@peter-ni-noob
Copy link
Contributor

[env]linux unbuntu 18,python=3.8.raw conda envirionment.
I just follow the CONTRIBUTING.rst,and dont change anything,after "make setup","make pre-commit" is not passed because :
scripts/generate_release_notes.py:82: error: Module has no attribute "BooleanOptionalAction" [attr-defined]
Found 1 error in 1 file (checked 339 source files)
rst code is two backticks............................................Passed
rstcheck.................................................................Failed

  • hook id: rstcheck
  • exit code: 1

WARNING:rstcheck_core.checker:An AttributeError error occured. This is most probably due to a code block directive (code/code-block/sourcecode) without a specified language. This may result in a false negative for source: 'docs/source/contributing.rst'. The reason can also be another directive. For more information see the FAQ (https://rstcheck-core.rtfd.io/en/latest/faq) or the corresponding github issue: rstcheck/rstcheck-core#3.
WARNING:rstcheck_core.checker:An AttributeError error occured. This is most probably due to a code block directive (code/code-block/sourcecode) without a specified language. This may result in a false negative for source: 'docs/source/changelog.rst'. The reason can also be another directive. For more information see the FAQ (https://rstcheck-core.rtfd.io/en/latest/faq) or the corresponding github issue: rstcheck/rstcheck-core#3.
WARNING:rstcheck_core.checker:An AttributeError error occured. This is most probably due to a code block directive (code/code-block/sourcecode) without a specified language. This may result in a false negative for source: 'docs/source/index.rst'. The reason can also be another directive. For more information see the FAQ (https://rstcheck-core.rtfd.io/en/latest/faq) or the corresponding github issue: rstcheck/rstcheck-core#3.
docs/source/api.rst:4: (INFO/1) No directive entry for "automodule" in module "docutils.parsers.rst.languages.en".
docs/source/api.rst:4: (ERROR/3) Unknown directive type "automodule".
docs/source/api.rst:5: (INFO/1) No directive entry for "automodule" in module "docutils.parsers.rst.languages.en".
docs/source/api.rst:5: (ERROR/3) Unknown directive type "automodule".
docs/source/modules.rst:4: (INFO/1) No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en".
docs/source/modules.rst:4: (ERROR/3) Unknown directive type "autosummary".
Error! Issues detected.

@peter-ni-noob
Copy link
Contributor Author

peter-ni-noob commented Dec 22, 2023

I found the cause of this problem is the version of python,it needs python 3.9+,I think we need specify the version recommendation for this project.ref:https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse

@peter-ni-noob
Copy link
Contributor Author

peter-ni-noob commented Dec 22, 2023

or I can change the code to make it compatible with python 3.8

@arkid15r
Copy link
Collaborator

Hi @peter-ni-noob, it seems you're right as BooleanOptionalAction is not available for python3.8
The issue is with our internal script that supports our release process. I guess it'd be fine just suppress the error if possible.

I'll look into it. Thanks for bringing this up!

@peter-ni-noob
Copy link
Contributor Author

I solved this bug in #1627

@arkid15r
Copy link
Collaborator

arkid15r commented Jan 6, 2024

Fixed in #1627

@arkid15r arkid15r closed this as completed Jan 6, 2024
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

2 participants