datopian / datopian/aircan

ModuleNotFoundError: No module named 'aircan.dependencies.google_cloud'

Open
#101 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34
Forks
8
Avg merge
2d 22h
Merged PRs (30d)
1

Description

When starting AirFlow or checking dags with airflow list_dags in a clean Python 3.7 environment the following trace appears:

{dagbag.py:239} ERROR - Failed to import: /home/leo/Freelancing/Datopian/aircan/aircan/dags/api_ckan_import_to_bq.py
Traceback (most recent call last):
  File "/home/leo/.pyenv/versions/3.7.0/lib/python3.7/site-packages/airflow/models/dagbag.py", line 236, in process_file
    m = imp.load_source(mod_name, filepath)
  File "/home/leo/.pyenv/versions/3.7.0/lib/python3.7/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/leo/Freelancing/Datopian/aircan/aircan/dags/api_ckan_import_to_bq.py", line 9, in <module>
    from aircan.dependencies.google_cloud.bigquery_handler import bq_import_csv
ModuleNotFoundError: No module named 'aircan.dependencies.google_cloud'

Steps to reproduce:

Set a clean python 3.7 environment
Install Airflow Dependencies
Install Airflow
Install aircan dependencies
Install aircan from repo (python setup.py install)
Set environment variables and airflow configurations as per this repository's README.md file
Execute airflow list_dags or launch airflow webserver

Desired behaviour:

aircan.dependencies.google_cloud should be installed correctly when installing aircan and no error message should appear.

@cuducos @hannelita

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with setup.py and the installation steps in README.md, then inspect how aircan/dependencies/google_cloud is packaged. Reproduce in a clean Python 3.7 environment and run airflow list_dags; done means installing aircan makes the module importable without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
build-system, data-engineering
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.