question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

run build.py get error AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'

See original GitHub issue

hi i want update to 0.51 from 0.50 i run python build.py build --desktop cpu -v and python build.py build --help get same error 👇

Traceback (most recent call last):
  File "build.py", line 341, in <module>
    Argument().command().run()
  File "build.py", line 310, in __init__
    build_command_parser.add_argument('--resources', action=argparse.BooleanOptionalAction, default=True)
AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'

this my console image


I think this project is amazing I want to contribute code but i will only unity so i can help what (●’◡’●)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
homulercommented, Mar 22, 2021

I overlooked that Python 3.9 is required to use argparse.BooleanOptionalAction. As a workaround, will you upgrade python and try again?

1reaction
Leuconoecommented, Apr 13, 2021

I put the library with BooleanOptionalAction in the same path as build.py. The build went without a problem.

wget --no-clobber https://raw.githubusercontent.com/python/cpython/master/Lib/argparse.py

Read more comments on GitHub >

github_iconTop Results From Across the Web

run capital-gains command and get erro: AttributeError: ...
run capital-gains command and get erro: AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction' BooleanOptionalAction was ...
Read more >
module 'argparse' has no attribute 'BooleanOptionalAction'
The argparse.BooleanOptionalAction feature is only available in Python 3.9 and above. If you try to run this code in Python 3.8 and below....
Read more >
module 'argparse' has no attribute 'BooleanOptionalAction ...
I'm running on colab and have no idea how to fix it because I'm a noob at programming. On the cell that has...
Read more >
Issue 40862: argparse.BooleanOptionalAction accept and ...
BooleanOptionalAction was introduced in Python3.9 so there is no code there ... bpo-40862: Raise TypeError when const is given to argparse.
Read more >
run capital-gains command and get erro: AttributeError
Coding example for the question run capital-gains command and get erro: AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found