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

Inconsistent naming per standards - PLACEHOLDER FILL MORE DETAILS LATER #86

Open
whitej6 opened this issue Nov 10, 2023 · 3 comments
Open

Comments

@whitej6
Copy link
Contributor

whitej6 commented Nov 10, 2023

Environment

  • Python version:
  • Nautobot version:
  • nautobot-welcome-wizard version:

Expected Behavior

Observed Behavior

Steps to Reproduce

@whitej6
Copy link
Contributor Author

whitej6 commented Nov 10, 2023

Traceback caused by it

nautobot-welcome-wizard-nautobot-1  | Traceback (most recent call last):
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
nautobot-welcome-wizard-nautobot-1  |     return next(cls.discover(name=name))
nautobot-welcome-wizard-nautobot-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-welcome-wizard-nautobot-1  | StopIteration
nautobot-welcome-wizard-nautobot-1  | 
nautobot-welcome-wizard-nautobot-1  | During handling of the above exception, another exception occurred:
nautobot-welcome-wizard-nautobot-1  | 
nautobot-welcome-wizard-nautobot-1  | Traceback (most recent call last):
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/nautobot/extras/plugins/utils.py", line 65, in load_plugin
nautobot-welcome-wizard-nautobot-1  |     plugin = importlib.import_module(plugin_name)
nautobot-welcome-wizard-nautobot-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
nautobot-welcome-wizard-nautobot-1  |     return _bootstrap._gcd_import(name[level:], package, level)
nautobot-welcome-wizard-nautobot-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-welcome-wizard-nautobot-1  |   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
nautobot-welcome-wizard-nautobot-1  |   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
nautobot-welcome-wizard-nautobot-1  |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
nautobot-welcome-wizard-nautobot-1  |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
nautobot-welcome-wizard-nautobot-1  |   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
nautobot-welcome-wizard-nautobot-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
nautobot-welcome-wizard-nautobot-1  |   File "/source/welcome_wizard/__init__.py", line 6, in <module>
nautobot-welcome-wizard-nautobot-1  |     __version__ = metadata.version(__name__)
nautobot-welcome-wizard-nautobot-1  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/importlib/metadata/__init__.py", line 1008, in version
nautobot-welcome-wizard-nautobot-1  |     return distribution(distribution_name).version
nautobot-welcome-wizard-nautobot-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
nautobot-welcome-wizard-nautobot-1  |     return Distribution.from_name(distribution_name)
nautobot-welcome-wizard-nautobot-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
nautobot-welcome-wizard-nautobot-1  |     raise PackageNotFoundError(name)
nautobot-welcome-wizard-nautobot-1  | importlib.metadata.PackageNotFoundError: No package metadata was found for welcome_wizard
nautobot-welcome-wizard-nautobot-1  | 
nautobot-welcome-wizard-nautobot-1  | The above exception was the direct cause of the following exception:
nautobot-welcome-wizard-nautobot-1  | 
nautobot-welcome-wizard-nautobot-1  | Traceback (most recent call last):
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/nautobot/core/runner/runner.py", line 117, in settings_callback
nautobot-welcome-wizard-nautobot-1  |     initializer(
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/nautobot/core/cli/__init__.py", line 178, in _configure_settings
nautobot-welcome-wizard-nautobot-1  |     load_plugins(settings)
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/nautobot/extras/plugins/utils.py", line 55, in load_plugins
nautobot-welcome-wizard-nautobot-1  |     load_plugin(plugin_name, settings)
nautobot-welcome-wizard-nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/nautobot/extras/plugins/utils.py", line 68, in load_plugin
nautobot-welcome-wizard-nautobot-1  |     raise PluginNotFound(
nautobot-welcome-wizard-nautobot-1  | nautobot.extras.plugins.exceptions.PluginNotFound: Unable to import plugin welcome_wizard: Module not found. Check that the plugin module has been installed within the correct Python environment.

@ubajze
Copy link
Contributor

ubajze commented Dec 14, 2023

We have a similar issue because the plugin is installed as nautobot-welcome-wizard while you have to use welcome-wizard to enable the plugin. This breaks our automation because of the inconsistency between the python name and the actual directory where the code lives.

@smk4664
Copy link
Contributor

smk4664 commented Aug 9, 2024

The fix is to rename the package to nautobot_welcome_wizard by renaming the folder. This could be viewed as a breaking change. I don't know how important this issue is though as there is no mention what automation is breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants