question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to import Airflow plugins

See original GitHub issue

Apache Airflow version: 1.10.14rc1

Kubernetes version (if you are using kubernetes) (use kubectl version): nop

Environment:

  • Cloud provider or hardware configuration: docker (linux)
  • OS (e.g. from /etc/os-release): Debian GNU/Linux 10 (buster) (official docker image)
  • Kernel (e.g. uname -a): Linux 5.4.39
  • Install tools: official docker image with docker-compose
  • Others:

What happened:

Unable to import Airflow plugins.

Here is a bit more context:

[2020-12-06 15:33:25,513] {plugins_manager.py:159} ERROR - Failed to import plugin AirflowPrometheus
worker_1     | Traceback (most recent call last):
worker_1     |   File "/home/airflow/.local/lib/python3.8/site-packages/airflow/plugins_manager.py", line 150, in load_entrypoint_plugins
worker_1     |     plugin_obj.__usable_import_name = entry_point.module
worker_1     | AttributeError: 'EntryPoint' object has no attribute 'module'
worker_1     | Traceback (most recent call last):
worker_1     |   File "/home/airflow/.local/lib/python3.8/site-packages/airflow/plugins_manager.py", line 150, in load_entrypoint_plugins
worker_1     |     plugin_obj.__usable_import_name = entry_point.module
worker_1     | AttributeError: 'EntryPoint' object has no attribute 'module'

What you expected to happen: Airflow plugins should be loaded without any problem.

How to reproduce it: From official latest docker image:

FROM apache/airflow:1.10.13-python3.8
RUN pip install --no-cache-dir --user -U apache-airflow==1.10.14rc1 airflow-exporter==1.3.0

Anything else we need to know:

I guess it’s related to recent changes in apache/airflow#12694. I have little knowledge on importlib, but it seems like there’s no module nor module_name in importlib.metadata.EntryPoint.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
kaxilcommented, Dec 6, 2020
1reaction
mjpieterscommented, Dec 6, 2020

i.e. remove ; python_version<"3.8" bit

Not remove; update 3.8 to 3.9.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't import Airflow plugins - Stack Overflow
After struggling with the Airflow documentation and trying some of the answers here without success, I found this approach from ...
Read more >
Plugins — Airflow Documentation
To troubleshoot issues with plugins, you can use the airflow plugins command. This command dumps information about loaded plugins. Changed in version 2.0: ......
Read more >
How to Correctly Setup Custom Plugins of Apache Airflow
Airflow plugins are helpful for users to complete tasks not available or easily ... Below I provide a simple demo of how to...
Read more >
Installing custom plugins - Amazon Managed Workflows for ...
Importing operators, sensors, hooks added in plugins using airflow. ... the size of a plugins.zip file explicitly, if dependencies can't be installed within ......
Read more >
How To Import Airflow Custom Operators, Plugins Without ...
To create a plugin you will need to derive the airflow. Our support team complained that sometimes job fails while making a connection,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found