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/04/01 14:05:31 UTC

[GitHub] [airflow] potiuk opened a new issue #22689: HDFS provider causes TypeError: __init__() got an unexpected keyword argument 'encoding'

potiuk opened a new issue #22689:
URL: https://github.com/apache/airflow/issues/22689


   ### Discussed in https://github.com/apache/airflow/discussions/22301
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **frankie1211** March 16, 2022</sup>
   I build the custom container image, below is my Dockerfile.
   
   FROM apache/airflow:2.2.4-python3.9
   USER root
   RUN apt-get update \
           && apt-get install -y gcc g++ vim libkrb5-dev build-essential libsasl2-dev \
           && apt-get autoremove -yqq --purge \
           && apt-get clean \
           && rm -rf /var/lib/apt/lists/*
   USER airflow
   RUN pip install --upgrade pip
   RUN pip install apache-airflow-providers-apache-spark --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.4/constraints-3.9.txt
   RUN pip install apache-airflow-providers-apache-hdfs --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.4/constraints-3.9.txt"
   
   
   But i got the error when i run the container
   
   airflow-init_1       | The container is run as root user. For security, consider using a regular user account.
   airflow-init_1       | ....................
   airflow-init_1       | ERROR! Maximum number of retries (20) reached.
   airflow-init_1       |
   airflow-init_1       | Last check result:
   airflow-init_1       | $ airflow db check
   airflow-init_1       | Traceback (most recent call last):
   airflow-init_1       |   File "/home/airflow/.local/bin/airflow", line 5, in <module>
   airflow-init_1       |     from airflow.__main__ import main
   airflow-init_1       |   File "/home/airflow/.local/lib/python3.9/site-packages/airflow/__main__.py", line 28, in <module>
   airflow-init_1       |     from airflow.cli import cli_parser
   airflow-init_1       |   File "/home/airflow/.local/lib/python3.9/site-packages/airflow/cli/cli_parser.py", line 621, in <module>
   airflow-init_1       |     type=argparse.FileType('w', encoding='UTF-8'),
   airflow-init_1       | TypeError: __init__() got an unexpected keyword argument 'encoding'
   airflow-init_1       |
   airflow_airflow-init_1 exited with code 1
   </div>


-- 
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