z3z1ma / dbt-osmosis

Provides automated YAML management, a dbt server, streamlit workbench, and git-integrated dbt model output diff tools
https://z3z1ma.github.io/dbt-osmosis/
Apache License 2.0
422 stars 45 forks source link

Error: AttributeError: module 'dbt.config.profile' has no attribute 'DEFAULT_PROFILES_DIR' #53

Closed Brandon-Peebles-Zocdoc closed 1 year ago

Brandon-Peebles-Zocdoc commented 1 year ago

I recently found out about dbt-osmosis and it seems really interesting! Was trying to test it out but am running into an with it not seeming to find my profiles.yml file. I installed via pip and tried running some commands but always get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/dbt-osmosis", line 5, in <module>
    from dbt_osmosis.main import cli
  File "/usr/local/lib/python3.11/site-packages/dbt_osmosis/main.py", line 162, in <module>
    DEFAULT_PROFILES_DIR = dbt.config.profile.DEFAULT_PROFILES_DIR
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'dbt.config.profile' has no attribute 'DEFAULT_PROFILES_DIR'

I attempted to use the --profiles-dir arg with no luck. My profiles.yml file is located in its default location, ~/.dbt.

dbt-core==1.4.5 dbt-osmosis==0.5.0 dbt-snowflake==1.4.2

z3z1ma commented 1 year ago

I gotcha @Brandon-Peebles-Zocdoc You should bump dbt-osmosis to the latest version, that is a heavily outdated version!

z3z1ma commented 1 year ago

dbt-osmosis==0.11.14 is the latest. 0.5.0 is almost a year ago and maybe 100+ commits old. If the new version works, we will close this out!

Brandon-Peebles-Zocdoc commented 1 year ago

Oh wow lol, no idea how it installed one that outdated. I had even ran pip upgrade. Let me see what I can do to fix it! Thanks!

Brandon-Peebles-Zocdoc commented 1 year ago

Finally got it working! Just the usual headache of managing python and pip versions — thanks!

MarekVigas commented 1 year ago

@z3z1ma Today I did a first-time install and got the same error. I just ran pip install dbt-osmosis and ended up with version 0.5.0. Looks like it is a problem with too strict Python version requirements. I'm using Python version 3.11.2 which is not allowed in the latest releases. See #62