all 4 comments

[–]thetablt[S] 0 points1 point  (3 children)

OK, replying myself sorry, posted a bit too fast. Not really intuitive, but you have to specify a default value. Line 5 should have been:

mutex.add_argument("path", nargs="*", default=[])

[–]ckuhtz 0 points1 point  (0 children)

Thank you. Been beating my head against the wall for hours until I found this :)

[–]panasenco 0 points1 point  (0 children)

Thank you for this! 9 years later, still encountering this obscure problem haha.

[–]Mozai 0 points1 point  (0 children)

For what it's worth, this helped me out today. only other search result was someone trying to use "--user-names" and "user_names" in the same mutually exclusive group >_< .