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

make push-to-ecr AWS_ACCOUNT_ID=<account> does not work #3

Open
P13612 opened this issue Apr 15, 2022 · 2 comments
Open

make push-to-ecr AWS_ACCOUNT_ID=<account> does not work #3

P13612 opened this issue Apr 15, 2022 · 2 comments

Comments

@P13612
Copy link

P13612 commented Apr 15, 2022

Hi,

your terraform scripts are fine. I had to adjust them to the latest terraform v.1.1.7, but it general all was fine.
So

make infra-plan
make infra-apply

does the job impeccable.

But now comes

make push-to-ecr AWS_ACCOUNT_ID=

Traceback (most recent call last):
File "/usr/local/bin/dbt", line 5, in
from dbt.main import main
File "/usr/local/lib/python3.7/site-packages/dbt/main.py", line 12, in
import dbt.task.run as run_task
File "/usr/local/lib/python3.7/site-packages/dbt/task/run.py", line 8, in
from dbt.node_runners import ModelRunner, RPCExecuteRunner
File "/usr/local/lib/python3.7/site-packages/dbt/node_runners.py", line 5, in
from dbt.contracts.results import RunModelResult, collect_timing_info,
File "/usr/local/lib/python3.7/site-packages/dbt/contracts/results.py", line 4, in
from dbt.contracts.graph.manifest import COMPILE_RESULT_NODE_CONTRACT
File "/usr/local/lib/python3.7/site-packages/dbt/contracts/graph/manifest.py", line 2, in
from dbt.contracts.graph.parsed import PARSED_NODE_CONTRACT,
File "/usr/local/lib/python3.7/site-packages/dbt/contracts/graph/parsed.py", line 5, in
import dbt.clients.jinja
File "/usr/local/lib/python3.7/site-packages/dbt/clients/jinja.py", line 7, in
import jinja2._compat
ModuleNotFoundError: No module named 'jinja2._compat'

This expects /usr/local/bin/dbt. This is not on my server. Is it inside the Docker-image? But why then missing modules?

I lost track. What is your installation script expecting?

Please give me a clue.

Thank you

Peter

@P13612
Copy link
Author

P13612 commented Apr 15, 2022

It turns out:
dbt-core 0.14.2 requires Jinja2>=2.10

so if at all

RUN pip uninstall --yes jinja2
RUN pip install --force-reinstall --user jinja2==2.10

This helps.

@P13612
Copy link
Author

P13612 commented Apr 15, 2022

Dockerfile:

FROM python:3.7.4-slim-stretch

MAINTAINER nicor88

COPY requirements.txt .
RUN pip install -r requirements.txt

COPY config/profiles.dist.yml /root/.dbt/profiles.yml

WORKDIR /dbt

COPY dbt_project.yml /dbt/dbt_project.yml
COPY macros /dbt/macros
COPY models /dbt/models

COPY tests /dbt/tests

install dbt deps

RUN pip install --upgrade pip
RUN pip install --force-reinstall --user jinja2==2.10
RUN pip install --force-reinstall --user markupsafe==2.0.1
RUN dbt deps

This worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant