You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/22 11:14:50 UTC
[GitHub] [airflow] michelbouchou opened a new issue #21730: Errors during airflow import
michelbouchou opened a new issue #21730:
URL: https://github.com/apache/airflow/issues/21730
### Apache Airflow version
2.0.2
### What happened
```
Python 3.7.12 (default, Feb 8 2022, 05:37:08)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import airflow
Unable to load the config, contains a configuration error.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/logging/config.py", line 388, in resolve
found = getattr(found, frag)
AttributeError: module 'airflow.utils.log' has no attribute 'file_processor_handler'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/logging/config.py", line 390, in resolve
self.importer(used)
File "/usr/local/lib/python3.7/site-packages/airflow/utils/log/file_processor_handler.py", line 25, in <module>
from airflow.utils.helpers import parse_template_string
File "/usr/local/lib/python3.7/site-packages/airflow/utils/helpers.py", line 27, in <module>
from flask import url_for
File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line 19, in <module>
from . import json
File "/usr/local/lib/python3.7/site-packages/flask/json/__init__.py", line 15, in <module>
from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.7/site-packages/itsdangerous/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/usr/local/lib/python3.7/logging/config.py", line 713, in configure_handler
klass = self.resolve(cname)
File "/usr/local/lib/python3.7/logging/config.py", line 397, in resolve
raise v
File "/usr/local/lib/python3.7/logging/config.py", line 390, in resolve
self.importer(used)
File "/usr/local/lib/python3.7/site-packages/airflow/utils/log/file_processor_handler.py", line 25, in <module>
from airflow.utils.helpers import parse_template_string
File "/usr/local/lib/python3.7/site-packages/airflow/utils/helpers.py", line 27, in <module>
from flask import url_for
File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line 19, in <module>
from . import json
File "/usr/local/lib/python3.7/site-packages/flask/json/__init__.py", line 15, in <module>
from itsdangerous import json as _json
ValueError: Cannot resolve 'airflow.utils.log.file_processor_handler.FileProcessorHandler': cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.7/site-packages/itsdangerous/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/airflow/__init__.py", line 46, in <module>
settings.initialize()
File "/usr/local/lib/python3.7/site-packages/airflow/settings.py", line 434, in initialize
LOGGING_CLASS_PATH = configure_logging()
File "/usr/local/lib/python3.7/site-packages/airflow/logging_config.py", line 62, in configure_logging
raise e
File "/usr/local/lib/python3.7/site-packages/airflow/logging_config.py", line 57, in configure_logging
dictConfig(logging_config)
File "/usr/local/lib/python3.7/logging/config.py", line 800, in dictConfig
dictConfigClass(config).configure()
File "/usr/local/lib/python3.7/logging/config.py", line 571, in configure
'%r' % name) from e
ValueError: Unable to configure handler 'processor'
```
### What you expected to happen
_No response_
### How to reproduce
Dockerfile
```
FROM python:3.7
ENV POETRY_HOME="/opt/poetry"
ENV POETRY_VIRTUALENVS_CREATE=false
# prepend poetry
ENV PATH="$POETRY_HOME/bin:$PATH"
RUN apt update && apt install python3-dev default-libmysqlclient-dev -y \
&& pip3 install --upgrade pip \
&& pip3 install mysqlclient s3fs \
&& pip3 install rx==1.6.1 \
&& pip3 install PrettyTable \
&& curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
# adding aws cli
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm awscliv2.zip && rm -rf aws
COPY . /app
WORKDIR /app
RUN poetry config virtualenvs.create false && poetry install
```
pyproject.toml
```
[tool.poetry]
name = "app-name"
version = "0.1.0"
description = "This project contains all airflow dags."
[tool.poetry.dependencies]
python = "^3.7"
toml = "^0.9"
botocore = "^1.15.39"
boto3 = "^1.12.39"
apache-airflow = { version = "2.0.2" }
pytest = "^3.0"
pytest-cov = "^2.4"
apache-airflow-providers-amazon= "^1.4.0"
[tool.poetry.dev-dependencies]
```
### Operating System
Debian GNU/Linux 10 (buster)
### Versions of Apache Airflow Providers
apache-airflow-providers-amazon= "^1.4.0"
### Deployment
MWAA
### Deployment details
_No response_
### Anything else
Every time. It also happens with airflow 2.2.2 with a similar ValueError
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on issue #21730: Errors during airflow import
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #21730:
URL: https://github.com/apache/airflow/issues/21730#issuecomment-1049013808
> poetry install
> While it is possible to install Airflow with tools like [Poetry](https://python-poetry.org/) or [pip-tools](https://pypi.org/project/pip-tools), they do not share the same workflow as pip - especially when it comes to constraint vs. requirements management. Installing via Poetry or pip-tools is not currently supported.
https://github.com/apache/airflow#installing-from-pypi
Please use pip with constraints files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj closed issue #21730: Errors during airflow import
Posted by GitBox <gi...@apache.org>.
mik-laj closed issue #21730:
URL: https://github.com/apache/airflow/issues/21730
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #21730: Errors during airflow import
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #21730:
URL: https://github.com/apache/airflow/issues/21730#issuecomment-1047688915
Thanks for opening your first issue here! Be sure to follow the issue template!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org