Skip to content

Removed duplicate --user-proxy-type definition#117

Merged
husseinmozannar merged 1 commit intomainfrom
matheus-backend
May 27, 2025
Merged

Removed duplicate --user-proxy-type definition#117
husseinmozannar merged 1 commit intomainfrom
matheus-backend

Conversation

@matheusmaldaner
Copy link
Copy Markdown
Contributor

Fixed argparse conflict by removing duplicate --user-proxy-type definition. This issue prevented the _cli.py from running as seen in the error below.

Command executed:
python -m magentic_ui._cli

Error:

RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/matheus/repos/05-27-2025/magentic-ui/.venv/lib/python3.12/site-packages/magentic_ui/_cli.py", line 446, in <module>
    main()
  File "/home/matheus/repos/05-27-2025/magentic-ui/.venv/lib/python3.12/site-packages/magentic_ui/_cli.py", line 341, in main
    parser.add_argument(
  File "/usr/lib/python3.12/argparse.py", line 1507, in add_argument
    return self._add_action(action)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/argparse.py", line 1889, in _add_action
    self._optionals._add_action(action)
  File "/usr/lib/python3.12/argparse.py", line 1709, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/argparse.py", line 1521, in _add_action
    self._check_conflict(action)
  File "/usr/lib/python3.12/argparse.py", line 1658, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/usr/lib/python3.12/argparse.py", line 1667, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --user-proxy-type: conflicting option string: --user-proxy-type

Fix:
Removed duplicate --user-proxy-type definition. I was then able to run the system in my command line interface with no issues.

To-Do:

  • Document how to run the CLI locally using python -m magentic_ui._cli

@matheusmaldaner matheusmaldaner added the bug Something isn't working label May 27, 2025
@husseinmozannar husseinmozannar merged commit dcb9131 into main May 27, 2025
9 checks passed
@husseinmozannar husseinmozannar deleted the matheus-backend branch May 27, 2025 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants