Apache Airflow version
2.5.2 What happened
Not able to create new (Admin - > Connection -> When I press + sign it gives below error regarding airflow.providers.cncf
Error:
Ooops!
Something bad has happened.
Airflow is used by many users, and it is very likely that others had similar problems and you can easily find a solution to your problem.
Consider following these steps:
gather the relevant information (detailed logs with errors, reproduction steps, details of your deployment)
find similar issues using:
GitHub Discussions
GitHub Issues
Stack Overflow
the usual search engine you use on a daily basis
if you run Airflow on a Managed Service, consider opening an issue using the service support channels
if you tried and have difficulty with diagnosing and fixing the problem yourself, consider creating a bug report.
Make sure however, to include all relevant details and results of your investigation so far.
Python version: 3.9.5 Airflow version: 2.5.0
Traceback (most recent call last): File
"/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line
> 2528, in wsgi_app response = self.full_dispatch_request() File
"/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line
1825, in full_dispatch_request rv = self.handle_user_exception(e) File
"/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line
1823, in full_dispatch_request rv = self.dispatch_request() File
"/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line
1799, in dispatch_request return
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File
"/usr/local/lib/python3.9/site-packages/airflow/www/decorators.py",
line 125, in wrapper return f(*args, **kwargs) File
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py",
line 133, in wraps return f(self, *args, **kwargs) File
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/views.py",
line 594, in add return self.render_template( File
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/baseviews.py",
line 322, in render_template return render_template( File
"/home/airflow/.local/lib/python3.9/site-packages/flask/templating.py",
line 147, in render_template return _render(app, template, context)
File
"/home/airflow/.local/lib/python3.9/site-packages/flask/templating.py",
line 130, in _render rv = template.render(context) File
"/home/airflow/.local/lib/python3.9/site-packages/jinja2/environment.py",
line 1301, in render self.environment.handle_exception() File
"/home/airflow/.local/lib/python3.9/site-packages/jinja2/environment.py",
line 936, in handle_exception raise
rewrite_traceback_stack(source=source) File
"/usr/local/lib/python3.9/site-packages/airflow/www/templates/airflow/conn_create.html",
line 20, in top-level template code {% extends
'appbuilder/general/model/add.html' %} File
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/templates/appbuilder/general/model/add.html",
line 2, in top-level template code {% import
'appbuilder/general/lib.html' as lib %} File
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/templates/appbuilder/base.html",
line 1, in top-level template code {% extends base_template %} File
"/usr/local/lib/python3.9/site-packages/airflow/www/templates/airflow/main.html",
line 21, in top-level template code {% from 'airflow/_messages.html'
import show_message %} File
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html",
line 2, in top-level template code {% import 'appbuilder/baselib.html'
as baselib %} File
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/templates/appbuilder/init.html",
line 50, in top-level template code {% block tail %} File
"/usr/local/lib/python3.9/site-packages/airflow/www/templates/airflow/conn_create.html",
line 31, in block 'tail' <script id="field_behaviours"
type="text/json">{{ widgets["add"].field_behaviours }}</script> File
"/home/airflow/.local/lib/python3.9/site-packages/jinja2/environment.py",
line 485, in getattr return getattr(obj, attribute) File
"/usr/local/lib/python3.9/functools.py", line 969, in get val =
self.func(instance) File
"/usr/local/lib/python3.9/site-packages/airflow/www/views.py", line
4217, in field_behaviours return
json.dumps(ProvidersManager().field_behaviours) File
"/usr/local/lib/python3.9/site-packages/airflow/providers_manager.py",
line 957, in field_behaviours self.initialize_providers_hooks() File
"/usr/local/lib/python3.9/site-packages/airflow/providers_manager.py",
line 327, in wrapped_function func(*args, **kwargs) File
"/usr/local/lib/python3.9/site-packages/airflow/providers_manager.py",
line 413, in initialize_providers_hooks
self.initialize_providers_list() File
"/usr/local/lib/python3.9/site-packages/airflow/providers_manager.py",
line 327, in wrapped_function func(*args, **kwargs) File
"/usr/local/lib/python3.9/site-packages/airflow/providers_manager.py",
line 390, in initialize_providers_list
self._discover_all_providers_from_packages() File
"/usr/local/lib/python3.9/site-packages/airflow/providers_manager.py",
line 462, in _discover_all_providers_from_packages provider_info =
entry_point.load()() File
"/usr/local/lib/python3.9/site-packages/importlib_metadata/init.py",
line 207, in load module = import_module(match.group('module')) File
"/usr/local/lib/python3.9/importlib/init.py", line 127, in
import_module return _bootstrap._gcd_import(name[level:], package,
level) File "", line 1030, in _gcd_import File "", line 1007, in
_find_and_load File "", line 972, in _find_and_load_unlocked File "", line 228, in _call_with_frames_removed File "", line 1030, in
_gcd_import File "", line 1007, in _find_and_load File "", line 972, in _find_and_load_unlocked File "", line 228, in
_call_with_frames_removed File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 984, in
_find_and_load_unlocked ModuleNotFoundError: No module named 'airflow.providers.cncf'
What you think should happen instead
This happens when a new connection is being created freshly through Airflow Web - Admin - Connections - and then by pressing the Plus + symbol for creating a new connection for the system How to reproduce
This can be reproduced if we are going for creating the new connection. Its not even giving the chance to edit the existing connection. Operating System: GNU Linux 3.10.0-1160.81.1.el7.x86_64 Versions of Apache Airflow Providers: Airflow 2.5.0 Deployment Installed on: AWS Ec2