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.

Fatal on CLI invocation for python 2.7 1.10.10

See original GitHub issue

Python Version: Python 2.7.17 Apache Airflow version: 1.10.10

Environment:

  • Cloud provider or hardware configuration: MacOS
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a): Darwin elementl-mbppro-2019.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
  • Install tools: pip and virtualenv
  • Others:

What happened:

(debug-airflow-2.7-04-19-2020) [schrockn@mbp ~/code/dagster (fix-airflow)]$ airflow
Traceback (most recent call last):
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/bin/airflow", line 26, in <module>
    from airflow.bin.cli import CLIFactory
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/lib/python2.7/site-packages/airflow/bin/cli.py", line 79, in <module>
    api_module = import_module(conf.get('cli', 'api_client'))  # type: Any
  File "/Users/schrockn/.pyenv/versions/2.7.17/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/lib/python2.7/site-packages/airflow/api/client/local_client.py", line 24, in <module>
    from airflow.api.common.experimental import delete_dag
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/lib/python2.7/site-packages/airflow/api/common/experimental/delete_dag.py", line 25, in <module>
    from airflow.models.serialized_dag import SerializedDagModel
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/lib/python2.7/site-packages/airflow/models/serialized_dag.py", line 32, in <module>
    from airflow.serialization.serialized_objects import SerializedDAG
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/lib/python2.7/site-packages/airflow/serialization/serialized_objects.py", line 28, in <module>
    import cattr
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/lib/python2.7/site-packages/cattr/__init__.py", line 1, in <module>
    from .converters import Converter, UnstructureStrategy
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/lib/python2.7/site-packages/cattr/converters.py", line 15, in <module>
    from ._compat import (
  File "/Users/schrockn/venvs/debug-airflow-2.7-04-19-2020/lib/python2.7/site-packages/cattr/_compat.py", line 2, in <module>
    from functools import lru_cache, singledispatch  # noqa
ImportError: cannot import name lru_cache

What you expected to happen: Expect the airflow help string to print

How to reproduce it: Any cli invocation

Anything else we need to know: More relevant modules:

cattrs                             0.9.1
backports.functools-lru-cache      1.6.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
potiukcommented, Apr 19, 2020

Also see the information about using constraint files to install the dependencies that are guaranteed to work: https://github.com/apache/airflow/blob/v1-10-stable/CONTRIBUTING.rst#pinned-requirement-files

This installation method should work:

pip install apache-airflow[.... Some extras here]==1.10.10 \
    --constraint https://raw.githubusercontent.com/apache/airflow/1.10.10/requirements/requirements-python3.6.txt

This method is also used to prepare official airflow images.

In those requirement files cattrs are 0.9.0 version

0reactions
schrockncommented, Apr 19, 2020

Thanks! Definitely looks like a cattrs issue, rather than anything on your end. Thanks for explanation. Feel free to close! Unfortunately because of the state of python dependency management I don’t think this will be the first bug report like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Possible problem with python3.4? · Issue #127 · tox-dev/tox
I just installed Python 3.4a3 this morning on Mac OS X 10.8.5 and when I try to use it with tox, I get...
Read more >
TensorFlow not found using pip - Stack Overflow
The correct way to install it would be code'$ pip install --upgrade TF_BINARY_URL # Python 2.7 $ pip3 install --upgrade TF_BINARY_URL ...
Read more >
Installing Packages - Python Packaging User Guide - Python.org
This section covers the basics of how to install Python packages. ... virtualenv needs to be installed separately, but supports Python 2.7+ and...
Read more >
Apache Airflow 1.10.10
Allow Retrieving Airflow Connections & Variables from various Secrets backend. Stateless Webserver using DAG Serialization. Tasks with Dummy ...
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
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