nautobot/nautobot-app-circuit-maintenance

Crash at startup if `exchangelib` is not installed

Closed this issue · 0 comments

Environment

  • nautobot-circuit-maintenance version: 2.2.1

Expected Behavior

exchangelib is listed as an optional dependency so it should be possible to install nautobot-circuit-maintenance without it.

Observed Behavior

If exchangelib is not installed, Nautobot crashes at startup:

...
  File "/usr/local/lib/python3.11/site-packages/nautobot/extras/plugins/urls.py", line 40, in <module>
    urlpatterns = import_object(f"{plugin_path}.urls.urlpatterns")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot/extras/plugins/utils.py", line 46, in import_object
    spec.loader.exec_module(module)
  File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_circuit_maintenance/urls.py", line 6, in <module>
    from . import views
  File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_circuit_maintenance/views.py", line 19, in <module>
    from nautobot_circuit_maintenance.handle_notifications.sources import RedirectAuthorize
  File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_circuit_maintenance/handle_notifications/sources.py", line 21, in <module>
    import exchangelib
ModuleNotFoundError: No module named 'exchangelib'