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
456 stars 46 forks source link

AttributeError 'NoneType' object has no attribute 'current' #7

Closed hcylia closed 2 years ago

hcylia commented 2 years ago

I'm having this error :

    if SCHEMA_FILE.current is None:
AttributeError: 'NoneType' object has no attribute 'current'

Looking at the code in main.py and app.py, I've notices many things.

Here is an extract of the content of the « project » variable (dict) : {'name': 'MYPROJ', 'version': '1.0.1', 'project-root': 'my/path/MYPROJ/dbt', ....}

But in the scipt, to get the name and root path of the project it's done like that : project.project_name instead of project.name project.project_root instead of project.project-root

And SCHEMA_FILE is None because the proj variable, that should contain project.project_name => MYPROJvalue, has : my/path/MYPROJ/dbt. And node.get("package_name") = MYPROJ So the test comparing "node.get("package_name") == proj" is always False so SCHEMA_FILE is logically None.

nchelaru commented 2 years ago

I’m getting the same error, is it on the roadmap to fix this?

Great tool, by the way! :)

z3z1ma commented 2 years ago

Resolved!