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: CLI fails if missing plugins #104

Closed
pesap opened this issue Jan 17, 2025 · 1 comment · Fixed by #106
Closed

bug: CLI fails if missing plugins #104

pesap opened this issue Jan 17, 2025 · 1 comment · Fixed by #106
Assignees
Labels

Comments

@pesap
Copy link
Collaborator

pesap commented Jan 17, 2025

cli_functions.py is raising import error if plugin not found. We should just skip the plugin.

@pesap pesap added the Backlog label Jan 17, 2025
@pesap pesap self-assigned this Jan 17, 2025
@llavin13
Copy link

I guess just note on my end I seem to hit an error similar to this if I try to r2x init. I assume this is expected behavior for now?

Traceback (most recent call last):
  File "/home/llavin/.conda-envs/r2x/bin/r2x", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/kfs2/projects/ntps/llavin/R2X/src/r2x/cli.py", line 17, in cli
    parser = base_cli()
             ^^^^^^^^^^
  File "/kfs2/projects/ntps/llavin/R2X/src/r2x/cli_functions.py", line 172, in base_cli
    _ = get_additional_arguments(run_command)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/kfs2/projects/ntps/llavin/R2X/src/r2x/cli_functions.py", line 66, in get_additional_arguments
    package_script = importlib.import_module(f"{package}")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/llavin/.conda-envs/r2x/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'r2x.plugins.cambium'

@pesap pesap linked a pull request Jan 21, 2025 that will close this issue
pesap added a commit that referenced this issue Jan 22, 2025
This PR bumps version of infrasys to 0.2.1 and fixes some of the
incompatibility with the new version. It also adds some fixes for #104
and #105.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants