Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] "dbt deps" fails with ModuleNotFoundError: No module named 'pytz' #75

Closed
1 task done
heiderich opened this issue Mar 3, 2023 · 4 comments
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@heiderich
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After installting dbt-oracle 1.4.0 I get the following error when running
dbt deps:

Traceback (most recent call last):
  File "/usr/local/bin/dbt", line 5, in <module>
    from dbt.main import main
  File "/usr/local/lib/python3.10/site-packages/dbt/main.py", line 24, in <module>
    import dbt.task.build as build_task
  File "/usr/local/lib/python3.10/site-packages/dbt/task/build.py", line 1, in <module>
    from .run import RunTask, ModelRunner as run_model_runner
  File "/usr/local/lib/python3.10/site-packages/dbt/task/run.py", line 8, in <module>
    from .compile import CompileRunner, CompileTask
  File "/usr/local/lib/python3.10/site-packages/dbt/task/compile.py", line 4, in <module>
    from .runnable import GraphRunnableTask
  File "/usr/local/lib/python3.10/site-packages/dbt/task/runnable.py", line 11, in <module>
    from .printer import (
  File "/usr/local/lib/python3.10/site-packages/dbt/task/printer.py", line 22, in <module>
    from dbt.tracking import InvocationProcessor
  File "/usr/local/lib/python3.10/site-packages/dbt/tracking.py", line 26, in <module>
    import pytz
ModuleNotFoundError: No module named 'pytz'
The command '/bin/sh -c dbt deps' returned a non-zero code: 1

Expected Behavior

No response

Steps To Reproduce

Copy

FROM python:3.10
RUN pip install --upgrade pip
RUN pip install dbt-oracle==1.4.0
RUN dbt deps

into a file Dockerfile in an otherwise empty directory and run docker build .

Relevant log output using --debug flag enabled

No response

Environment

- OS: Linux
- Python: 3.10
- dbt: 1.4.0

What Oracle database version are you using dbt with?

No response

Additional Context

This was actually a bug in dbt-core (dbt-labs/dbt-core#7075), which is fixed in dbt-core 1.4.4.

Suggestion: Can you loosen the hard dependency on dbt-core 1.4.0 or replace it by dbt-core 1.4.4?

@heiderich heiderich added the bug Something isn't working label Mar 3, 2023
@aosingh aosingh self-assigned this Mar 3, 2023
@aosingh
Copy link
Member

aosingh commented Mar 3, 2023

@heiderich

Thanks for reporting this. Could you let me know how is this pytz module installed ?

Meanwhile I will check the dbt-core version and plan a fix.

@heiderich
Copy link
Author

@aosingh Using dbt-core 1.4.4, it should automatically be installed as a dependency thanks to dbt-labs/dbt-core#7077

I think guess #76 fixes the issue. Thanks for quickly taking care of it!

@aosingh
Copy link
Member

aosingh commented Mar 6, 2023

@heiderich

This should be fixed if you upgrade to dbt-oracle==1.4.1

Thanks for reporting this. Let me know if you have any questions.

@heiderich
Copy link
Author

Thanks for the quick fix @aosingh. dbt-oracle==1.4.1 fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants