damavis / airflow-pentaho-plugin

Pentaho plugin for Apache Airflow - Orquestate pentaho transformations and jobs from Airflow
Apache License 2.0
39 stars 17 forks source link

ModuleNotFoundError: No module named 'packaging' #10

Closed openinbigdata closed 3 years ago

openinbigdata commented 3 years ago

Hi guys,

I think I found the right place to report a problem. I'm facing this error in start airflow webserver: ERROR - Failed to import plugin airflow_pentaho Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/airflow/plugins_manager.py", line 210, in load_entrypoint_plugins plugin_class = entry_point.load() File "/usr/local/lib/python3.8/dist-packages/importlib_metadata/init.py", line 105, in load module = import_module(match.group('module')) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/usr/local/lib/python3.8/dist-packages/airflow_pentaho/plugin.py", line 19, in from airflow_pentaho.hooks.carte import PentahoCarteHook File "/usr/local/lib/python3.8/dist-packages/airflow_pentaho/hooks/carte.py", line 20, in from packaging import version ModuleNotFoundError: No module named 'packaging'

My environment is: Ubuntu 20.04 OpenJDK 8 PDI 9.1 Airflow 2.1.0 & 2.0.2 Python 3.8.5 airflow-pentaho-plugin 1.0.8

Cheers,

piffall commented 3 years ago

Hello @openinbigdata . Probably you have some issue with your pip setup. Please, try tu run one of these in order to fix it.

# for virtualenv
python -m pip install --upgrade pip
pip install --upgrade setuptools

# for system level
sudo python -m pip install --upgrade pip
sudo pip install --upgrade setuptools
openinbigdata commented 3 years ago

Hi Piffal,

Following your instruction for system level the problem continues. Just for information, Airflow is working and I can run PDI Jobs via bash operator. What else could I do? I wish I could use this plugin, it looks pretty good.

Do you think I should run the pip as sudo or is it not recommended?

I installed airflow both as sudo and as a user without sudo privileges and in both cases airflow works, but I can't get your plugin to work.

Screen Shot 2021-06-26 at 13 35 14

Cheers,

piffall commented 3 years ago

Hi @openinbigdata,

Please, try install packaging package: pip install packaging

openinbigdata commented 3 years ago

Hi @piffall,

I managed to install the packaging and there was no more error in the start of the airflow webserver and scheduler, but the HTTP option to create the connection to use the plugin doesn't appear, see the image. Any idea?

Screen Shot 2021-06-28 at 21 08 03

piffall commented 3 years ago

Try install this airflow-providers package: https://airflow.apache.org/docs/apache-airflow-providers-http/stable/index.html

openinbigdata commented 3 years ago

Hi @piffall

I have good news, it's working now, thanks for all your help.

Now, one doubt, would it be possible to configure the level of the log generated in the execution of the Job? I didn't find it anywhere.

Cheers,

piffall commented 3 years ago

Hi @openinbigdata ,

All operators constructors takes the parameter level to set the logging level of the task, take a look at the constructors that you are using:

CarteJobOperator CarteTransOperator PanOperator KitchenOperator

Thanks.