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

‘NoneType’ object cannot be interpreted as an integer #3353

Closed
1 of 5 tasks
yzwu1209 opened this issue May 13, 2021 · 10 comments
Closed
1 of 5 tasks

‘NoneType’ object cannot be interpreted as an integer #3353

yzwu1209 opened this issue May 13, 2021 · 10 comments
Labels
bug Something isn't working stale Issues that have gone stale

Comments

@yzwu1209
Copy link

Describe the bug

Previously I was able to run the same scripts without any problem. I am using macOS Mojave 10.14.6. But after I upgraded to 0.19.1, somehow I can’t run any dbt command, except dbt debug.

For example, I run the following command:
dbt run -m MODEL_1 --profiles-dir ./profiles (I create a profiles.yml under profiles folder; which has been working all along)

I would get the following error.

Running with dbt=0.19.1
Encountered an error:
‘NoneType’ object cannot be interpreted as an integer

I also ran dbt debug --profiles-dir ./profiles, and it showed that

Configuration:
profiles.yml file [OK found and valid]
dbt_project.yml file [OK found and valid]

I am not sure what went wrong. Could anyone give any insight? Thank you!

Expected behavior

The script should run without any issue and the table should be generated on snowflake like it used to.

System information

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

installed version: 0.19.1
   latest version: 0.19.1

Up to date!

Plugins:
  - bigquery: 0.19.1
  - snowflake: 0.19.1
  - redshift: 0.19.1
  - postgres: 0.19.1
(base) youzhi:gardasil chloewu$ dbt --version
installed version: 0.19.1
   latest version: 0.19.1

Up to date!

Plugins:
  - bigquery: 0.19.1
  - snowflake: 0.19.1
  - redshift: 0.19.1
  - postgres: 0.19.1

The operating system you're using: macOS Mojave 10.14.6

The output of python --version: Python 3.8.3

Additional context

Add any other context about the problem here.

@yzwu1209 yzwu1209 added bug Something isn't working triage labels May 13, 2021
@jtcohen6 jtcohen6 removed the triage label May 13, 2021
@jtcohen6
Copy link
Contributor

Hey @yzwu1209, thanks for the report! I'd like to get to the bottom of this. Could you check logs/dbt.log for the full stacktrace, so that we can see from where in dbt's python code this error is coming?

@yzwu1209
Copy link
Author

do you want me to attach the log here? Thanks!

@yzwu1209
Copy link
Author

yzwu1209 commented May 13, 2021

@jtcohen6 Please find them below. I think this is the portion that's related to the error.

2021-05-13 17:56:48.684857 (MainThread): Running with dbt=0.19.1
2021-05-13 17:56:49.634954 (MainThread): Loading KWallet
2021-05-13 17:56:49.636196 (MainThread): Loading SecretService
2021-05-13 17:56:49.637377 (MainThread): Loading Windows
2021-05-13 17:56:49.639129 (MainThread): Loading chainer
2021-05-13 17:56:49.640055 (MainThread): Loading macOS
2021-05-13 17:56:50.072840 (MainThread): running dbt with arguments Namespace(cls=<class 'dbt.task.run.RunTask'>, debug=False, defer=None, exclude=None, fail_fast=False, full_refresh=False, log_cache_events=False, log_format='default', models=['T1_encounters_wellness'], partial_parse=None, profile=None, profiles_dir='./profiles', project_dir=None, record_timing_info=None, rpc_method='run', selector_name=None, single_threaded=False, state=None, strict=False, target=None, test_new_parser=False, threads=None, use_cache=True, use_colors=None, vars='{}', version_check=True, warn_error=False, which='run', write_json=True)
2021-05-13 17:56:50.075065 (MainThread): Tracking: tracking
2021-05-13 17:56:50.075543 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x116ff3fa0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x116ff3ca0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x117016040>]}
2021-05-13 17:56:50.086209 (MainThread): Partial parsing not enabled
2021-05-13 17:56:50.087390 (MainThread): Parsing macros/constants.sql
2021-05-13 17:56:50.092909 (MainThread): Parsing macros/qc_vaccine_dose_gap.sql
2021-05-13 17:56:50.093678 (MainThread): Parsing macros/qc_datatype_validation.sql
2021-05-13 17:56:50.097072 (MainThread): Parsing macros/get_column_field.sql
2021-05-13 17:56:50.098944 (MainThread): Parsing macros/get_distinct_data.sql
2021-05-13 17:56:50.100771 (MainThread): Parsing macros/qc_month_to_month.sql
2021-05-13 17:56:50.102297 (MainThread): Parsing macros/qc_col_names.sql
2021-05-13 17:56:50.103955 (MainThread): Parsing macros/get_cols_filtered.sql
2021-05-13 17:56:50.105624 (MainThread): Parsing macros/qc_column_validation.sql
2021-05-13 17:56:50.113560 (MainThread): Parsing macros/catalog.sql
2021-05-13 17:56:50.116035 (MainThread): Parsing macros/adapters.sql
2021-05-13 17:56:50.140078 (MainThread): Parsing macros/materializations/merge.sql
2021-05-13 17:56:50.141973 (MainThread): Parsing macros/materializations/view.sql
2021-05-13 17:56:50.143534 (MainThread): Parsing macros/materializations/table.sql
2021-05-13 17:56:50.146739 (MainThread): Parsing macros/materializations/incremental.sql
2021-05-13 17:56:50.156872 (MainThread): Parsing macros/core.sql
2021-05-13 17:56:50.160645 (MainThread): Parsing macros/materializations/helpers.sql
2021-05-13 17:56:50.168237 (MainThread): Parsing macros/materializations/snapshot/snapshot_merge.sql
2021-05-13 17:56:50.170980 (MainThread): Parsing macros/materializations/snapshot/strategies.sql
2021-05-13 17:56:50.188427 (MainThread): Parsing macros/materializations/snapshot/snapshot.sql
2021-05-13 17:56:50.218903 (MainThread): Parsing macros/materializations/seed/seed.sql
2021-05-13 17:56:50.237679 (MainThread): Parsing macros/materializations/incremental/helpers.sql
2021-05-13 17:56:50.240223 (MainThread): Parsing macros/materializations/incremental/incremental.sql
2021-05-13 17:56:50.246285 (MainThread): Parsing macros/materializations/common/merge.sql
2021-05-13 17:56:50.258165 (MainThread): Parsing macros/materializations/table/table.sql
2021-05-13 17:56:50.263994 (MainThread): Parsing macros/materializations/view/view.sql
2021-05-13 17:56:50.275194 (MainThread): Parsing macros/materializations/view/create_or_replace_view.sql
2021-05-13 17:56:50.281257 (MainThread): Parsing macros/etc/get_custom_alias.sql
2021-05-13 17:56:50.282619 (MainThread): Parsing macros/etc/query.sql
2021-05-13 17:56:50.283973 (MainThread): Parsing macros/etc/is_incremental.sql
2021-05-13 17:56:50.285915 (MainThread): Parsing macros/etc/datetime.sql
2021-05-13 17:56:50.294033 (MainThread): Parsing macros/etc/get_custom_schema.sql
2021-05-13 17:56:50.295982 (MainThread): Parsing macros/etc/get_custom_database.sql
2021-05-13 17:56:50.297583 (MainThread): Parsing macros/adapters/common.sql
2021-05-13 17:56:50.333360 (MainThread): Parsing macros/schema_tests/relationships.sql
2021-05-13 17:56:50.335653 (MainThread): Parsing macros/schema_tests/not_null.sql
2021-05-13 17:56:50.337585 (MainThread): Parsing macros/schema_tests/unique.sql
2021-05-13 17:56:50.339529 (MainThread): Parsing macros/schema_tests/accepted_values.sql
2021-05-13 17:56:50.346509 (MainThread): Partial parsing not enabled
2021-05-13 17:56:50.366112 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_hcp_trend".
2021-05-13 17:56:50.376449 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_patient_trend".
2021-05-13 17:56:50.382865 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_patient_counts".
2021-05-13 17:56:50.390938 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_claim_trend".
2021-05-13 17:56:50.395532 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_claim_counts".
2021-05-13 17:56:50.400040 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_hcp_counts_all_months".
2021-05-13 17:56:50.412806 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_claim_counts_all_months".
2021-05-13 17:56:50.418961 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_null_code".
2021-05-13 17:56:50.423189 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_hcp_counts".
2021-05-13 17:56:50.427805 (MainThread): Acquiring new snowflake connection "model.gardasil.QC1_monthly_patient_counts_all_months".
2021-05-13 17:56:50.434563 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_all_duplicate_validation".
2021-05-13 17:56:50.438876 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_trm_datatype_validation".
2021-05-13 17:56:50.451261 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_trm_duplicate_check".
2021-05-13 17:56:50.454512 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_all_col_validation".
2021-05-13 17:56:50.458485 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_completion_datatype_validation".
2021-05-13 17:56:50.462677 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_exception_report_cmp".
2021-05-13 17:56:50.466414 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_count_duplicate_check".
2021-05-13 17:56:50.469904 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_trq_duplicate_check".
2021-05-13 17:56:50.473503 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_all_datatype_validation".
2021-05-13 17:56:50.478421 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_completion_rate_check".
2021-05-13 17:56:50.482080 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_exception_report_all".
2021-05-13 17:56:50.485820 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_completion_col_validation".
2021-05-13 17:56:50.498960 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_trq_col_validation".
2021-05-13 17:56:50.503601 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_exception_report_cnt".
2021-05-13 17:56:50.507656 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_count_col_validation".
2021-05-13 17:56:50.512304 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_trq_datatype_validation".
2021-05-13 17:56:50.516515 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_exception_report_tr".
2021-05-13 17:56:50.521036 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_trm_col_validation".
2021-05-13 17:56:50.525803 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_count_datatype_validation".
2021-05-13 17:56:50.530069 (MainThread): Acquiring new snowflake connection "model.gardasil.QC4_hcp_completion_duplicate_check".
2021-05-13 17:56:50.533330 (MainThread): Acquiring new snowflake connection "model.gardasil.T1_encounters_init".
2021-05-13 17:56:50.537486 (MainThread): Acquiring new snowflake connection "model.gardasil.T1_encounters_vaccine".
2021-05-13 17:56:50.541505 (MainThread): Acquiring new snowflake connection "model.gardasil.T1_patient_eligibility".
2021-05-13 17:56:50.548445 (MainThread): Acquiring new snowflake connection "model.gardasil.T1_bad_hcp".
2021-05-13 17:56:50.610045 (MainThread): Acquiring new snowflake connection "model.gardasil.T1_target_npi_list".
2021-05-13 17:56:50.616793 (MainThread): Acquiring new snowflake connection "model.gardasil.T1_encounters_wellness".
2021-05-13 17:56:50.629310 (MainThread): Acquiring new snowflake connection "model.gardasil.T1_wellness_pat_info".
2021-05-13 17:56:50.636929 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_g9_count".
2021-05-13 17:56:50.644568 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_gender_proportion".
2021-05-13 17:56:50.649111 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_tot_wellness_pat".
2021-05-13 17:56:50.653924 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_gender_percent".
2021-05-13 17:56:50.657927 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_tdap_count".
2021-05-13 17:56:50.661888 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_menacwy_count".
2021-05-13 17:56:50.665729 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_hcp_coverage_rating".
2021-05-13 17:56:50.669698 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_hcp_master".
2021-05-13 17:56:50.675689 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_tot_pat_cnt".
2021-05-13 17:56:50.681199 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cnt_hcp_decile_inclusion".
2021-05-13 17:56:50.684970 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_tr_g9_vaccines".
2021-05-13 17:56:50.689493 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_tr_trend_analysis_counts".
2021-05-13 17:56:50.694838 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_tr_tdap_vaccines".
2021-05-13 17:56:50.698755 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_tr_hcp_coverage_rating".
2021-05-13 17:56:50.702580 (MainThread): Acquiring new snowflake connection "model.gardasil.QC2_clean_tdap_dose_gap".
2021-05-13 17:56:50.707155 (MainThread): Acquiring new snowflake connection "model.gardasil.QC2_clean_g9_dose_gap".
2021-05-13 17:56:50.711120 (MainThread): Acquiring new snowflake connection "model.gardasil.QC2_clean_menacwy_dose_gap".
2021-05-13 17:56:50.714880 (MainThread): Acquiring new snowflake connection "model.gardasil.T3_cmp_completion_rates".
2021-05-13 17:56:50.721150 (MainThread): Acquiring new snowflake connection "model.gardasil.T4_cnt_hcp_count_deliverable".
2021-05-13 17:56:50.729031 (MainThread): Acquiring new snowflake connection "model.gardasil.T4_tr_trend_analysis_monthly_unfiltered".
2021-05-13 17:56:50.734097 (MainThread): Acquiring new snowflake connection "model.gardasil.T4_cnt_hcp_count_deliverable_unfiltered".
2021-05-13 17:56:50.742322 (MainThread): Acquiring new snowflake connection "model.gardasil.T4_tr_trend_analysis_monthly".
2021-05-13 17:56:50.746291 (MainThread): Acquiring new snowflake connection "model.gardasil.T4_tr_trend_analysis_quarterly".
2021-05-13 17:56:50.750290 (MainThread): Acquiring new snowflake connection "model.gardasil.T4_cmp_hcp_completion_deliverable".
2021-05-13 17:56:50.754611 (MainThread): Acquiring new snowflake connection "model.gardasil.T4_cmp_hcp_completion_deliverable_unfiltered".
2021-05-13 17:56:50.759059 (MainThread): Acquiring new snowflake connection "model.gardasil.T4_tr_trend_analysis_quarterly_unfiltered".
2021-05-13 17:56:50.762854 (MainThread): Acquiring new snowflake connection "model.gardasil.T2_sentinel_clean_tdap_vaccines".
2021-05-13 17:56:50.766122 (MainThread): Acquiring new snowflake connection "model.gardasil.T2_clean_tdap_vaccines".
2021-05-13 17:56:50.775809 (MainThread): Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x118f33340>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x118ec5ee0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x119718fa0>]}
2021-05-13 17:56:50.776025 (MainThread): Flushing usage events
2021-05-13 17:56:51.049712 (MainThread): Connection 'model.gardasil.T2_clean_tdap_vaccines' was properly closed.
2021-05-13 17:56:51.049843 (MainThread): Encountered an error:
2021-05-13 17:56:51.049944 (MainThread): 'NoneType' object cannot be interpreted as an integer
2021-05-13 17:56:51.056784 (MainThread): Traceback (most recent call last):
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/main.py", line 125, in main
    results, succeeded = handle_and_check(args)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/main.py", line 203, in handle_and_check
    task, res = run_from_args(parsed)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/main.py", line 256, in run_from_args
    results = task.run()
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/task/runnable.py", line 406, in run
    self._runtime_initialize()
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/task/runnable.py", line 122, in _runtime_initialize
    super()._runtime_initialize()
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/task/runnable.py", line 79, in _runtime_initialize
    self.load_manifest()
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/task/runnable.py", line 66, in load_manifest
    self.manifest = get_full_manifest(self.config)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/perf_utils.py", line 28, in get_full_manifest
    return load_manifest(
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/manifest.py", line 862, in load_manifest
    return ManifestLoader.load_all(config, macro_manifest, macro_hook)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/manifest.py", line 442, in load_all
    loader.load(macro_manifest=macro_manifest)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/manifest.py", line 290, in load
    self.parse_project(project, macro_manifest, old_results)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/manifest.py", line 237, in parse_project
    self.parse_with_cache(path, parser, old_results)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/manifest.py", line 188, in parse_with_cache
    parser.parse_file(block)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/base.py", line 432, in parse_file
    self.parse_node(file_block)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/base.py", line 405, in parse_node
    self.render_update(node, config)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/base.py", line 380, in render_update
    self.render_with_context(node, config)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/parser/base.py", line 293, in render_with_context
    get_rendered(
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/clients/jinja.py", line 582, in get_rendered
    return render_template(template, ctx, node)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/dbt/clients/jinja.py", line 533, in render_template
    return template.render(ctx)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 250, in top-level template code
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/jinja2/sandbox.py", line 462, in call
    return __context.call(__obj, *args, **kwargs)
  File "/Users/chloewu/opt/anaconda3/lib/python3.8/site-packages/jinja2/sandbox.py", line 170, in safe_range
    rng = range_type(*args)
TypeError: 'NoneType' object cannot be interpreted as an integer

@jtcohen6
Copy link
Contributor

@yzwu1209 Thanks for including that stacktrace! It looks like the issue is coming from Jinja's range global function (docs, source). Are you using that anywhere in your project? Possibly in the T2_clean_tdap_vaccines model, since that's where the error interrupts parsing?

@yzwu1209
Copy link
Author

yzwu1209 commented May 13, 2021

yes i'm using it: {%- for i in range(var('vaccine_count_maximum')): %}
And the var('vaccine_count_maximum') is defined in dbt_project.yml file.

But it has never run into this error before. Any idea how to fix it?

@jtcohen6
Copy link
Contributor

Got it! Okay, I'm able to reproduce this error by just creating a model that looks like:

{%- for i in range(var('vaccine_count_maximum')): %}

    select {{ i }}
    {{ "union all" if not loop.last }}

{%- endfor -%}
Running with dbt=0.19.1
Encountered an error:
'NoneType' object cannot be interpreted as an integer

I'm able to remove it by doing any of the following:

Defining the var with a default value in dbt_project.yml:

vars:
  vaccine_count_maximum: 2

Including a default value in the var() call:

{%- for i in range(var('vaccine_count_maximum', 2)): %}

Defining the variable on the CLI via the --vars flag:

$ dbt run --vars 'vaccine_count_maximum: 2'

In any event, that's a horrible error message. Ideally, we could wrap it in a helpful pointer to the failed-to-parse model name/file. The place where we catch Jinja templating errors is here:

https://github.com/fishtown-analytics/dbt/blob/1eac726a07d4cdf8aa630573cd5476513dad2166/core/dbt/clients/jinja.py#L513-L524

The exception here is actually coming from python, not Jinja, so if we just include the built-in TypeError:

except (jinja2.exceptions.TemplateSyntaxError, TypeError) as e:
        e.translated = False
        raise CompilationException(str(e), node) from e

Then dbt's error message becomes:

Encountered an error:
Compilation Error in model fine_model (models/fine_model.sql)
  'NoneType' object cannot be interpreted as an integer

Which is, at least, a better place to start!

@yzwu1209
Copy link
Author

@jtcohen6 thank you so much for you prompt response. I have already defined the var in project yml. I'm wondering if the config format has changed in dbt@0.19.1? It looks to me that dbt is not picking up any vars that I defined in project yml.

@jtcohen6
Copy link
Contributor

@yzwu1209 Ah, okay, interesting! What does your vars block in dbt_project.yml look like? Are you including config-version: 2 at the top of that file?

@yzwu1209
Copy link
Author

@jtcohen6 Yes, I have to include config-version: 2 in dbt_project.yml, otherwise it won't run with dbt 0.19.1. But I know what's causing the issue. I have vars under models block, which used to work but not with the latest version.

And I agree to your earlier message that dbt should display a more detailed error message otherwise user might debug in a totally wrong direction, or maybe just point user to dbt.log at the end of the error message? I find it super useful.

Thank you for your support!

@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Issues that have gone stale
Projects
None yet
Development

No branches or pull requests

2 participants