Skip to content

"mutually exclusive arguments must be optional" ValueError on Windows and Linux #36

@samwyss

Description

@samwyss

Description

In v2.7.0, hypershell is not able to be run after installing with uv. An example traceback can be found below.

Traceback (most recent call last):
File "/home/helios/a/wysss/.local/bin/hs", line 4, in
from hypershell import main
File "/home/helios/a/wysss/.local/share/uv/tools/hypershell/lib/python3.10/site-packages/hypershell/init.py", line 25, in
from hypershell.submit import SubmitApp
File "/home/helios/a/wysss/.local/share/uv/tools/hypershell/lib/python3.10/site-packages/hypershell/submit.py", line 760, in
class SubmitApp(Application):
File "/home/helios/a/wysss/.local/share/uv/tools/hypershell/lib/python3.10/site-packages/hypershell/submit.py", line 770, in SubmitApp
input_interface.add_argument('task_args', nargs='*')
File "/usr/lib/python3.10/argparse.py", line 1460, in add_argument
return self._add_action(action)
File "/usr/lib/python3.10/argparse.py", line 1681, in _add_action
raise ValueError(msg)
ValueError: mutually exclusive arguments must be optional

This appears to be caused by the interface.add_mutually_exclusive_group() call as found in the lines linked below.

input_interface = interface.add_mutually_exclusive_group()

input_interface.add_argument('task_args', nargs='*')

Unfortunately, I haven't had time to explore this further, but I wanted to bring this up.

To Reproduce

Run hypershell with/without arguments on the system(s) described below.

hs <any args here>

Expected Behavior

Similar behavior to that of v2.6.6.

System

  • OS: Ubuntu 22.04 and 24.04, Windows 10
  • Hypershell Version: v2.7.0
  • uv Version: 0.7.8 and 0.7.9

Additional Context

This issue is not present in v2.6.6.

It might be a separate issue but it appears the man pages are also not installed either when installing hypershell with uv.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions