Skip to content

Circular import error #20738

@Ashwanth369

Description

@Ashwanth369

Apache Airflow version

2.2.2

What happened

I am working in building a project on top of airflow. One of the files uses the datetime.py file under the operators directory. It seems the file has this line:

import datetime

and because of this, I am encountering the circular import error:

AttributeError: partially initialized module 'datetime' has no attribute 'date' (most likely due to a circular import).

I am also facing a similar issue because of the sqlalchemy.py file under the utils folder. Is there anyway to overcome this issue?

What you expected to happen

No response

How to reproduce

No response

Operating System

Ubuntu 20.04

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions