-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
dbt 1.7.14
breaks with ImportError: cannot import name 'read_user_config' from 'dbt.config'
#5841
Comments
@elyobo Thanks for opening the issue! It would have been this change, which we backported to v1.7.14 + v1.6.14 in order to provide users with a proactive deprecation warning and ability to adopt a more explicit inheritance order for materializations:
In quick summary: It looks like sqlfluff/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py Lines 148 to 166 in baceed9
from dbt.config.runtime import RuntimeConfig as DbtRuntimeConfig
...
if self.dbt_version_tuple >= (1, 5):
...
else:
...
from dbt.config import read_user_config
user_config = read_user_config(flags.PROFILES_DIR) |
I haven't done any version upgrade on either dbt-core or sqlfluff, but still started facing this exact issue suddenly in the past 3-4 days. My versions are:
What can be the possible reasons behind this and how to solve the same? |
@greg-finley I think the issue is that the new version where this bug is fixed hasn't been published yet. |
With the dbt-core=1.7.1 the same issue still happening. Anybody has any update? Thank you. |
Hello @yingqiaozheng did you try sqlfluff 3.0.6 (released last week)? It should be fixed via #5842 |
Unfortunately, I still face this issue with sqlfluff 3.0.6 and dbt-postgres 1.8. The issue was fixed on downgrading dbt-Postgres to 1.7.14. |
|
stil experiencing this with sqlfluff 3.0.7 and dbt-core==1.7.10 |
@ZZNK - this was resolved for me by forcing an upgrade of sqlfluff-templater-dbt to 3.0.7 also |
Thanks @reubster , I had to update sqlfluff to 3.0.7 and all works. I am using dbt 1.8.1
|
Search before asking
What Happened
dbt-core
has just released1.7.14
; installingdbt-core
1.7.14
,dbt-bigquery
1.7.7
and the latestsqlfluff
3.0.5
andsqlfluff-templater-dbt
3.0.5
then trying to lint results inImportError: cannot import name 'read_user_config' from 'dbt.config'
All else the same but using
dbt-core
1.7.13
linting worksProbably relevant, dbt-core 1.7.14 release notes - https://github.com/dbt-labs/dbt-core/releases/tag/v1.7.14
dbt-labs/dbt-core#9183 is mentioned and sounds like it might be relevant
Expected Behaviour
linting should work without errors
Observed Behaviour
linting tails with
ImportError: cannot import name 'read_user_config' from 'dbt.config'
How to reproduce
install
dbt-core
1.7.14
,dbt-bigquery
1.7.7
,sqlfluff
3.0.5
, andsqlfluff-templater-dbt
3.0.5
run
sqlfluff lint
Dialect
bigquery
Version
dbt-core
1.7.14
,dbt-bigquery
1.7.7
,sqlfluff
3.0.5
, andsqlfluff-templater-dbt
3.0.5
Configuration
probably not relevant
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
The text was updated successfully, but these errors were encountered: