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

Fix case when table.original_file_path is None #51

Conversation

moreaupascal56
Copy link

@moreaupascal56 moreaupascal56 commented Feb 3, 2023

Hello, first thanks for the package I think this can be very useful as more and more dbt projects become matures.
There was a bug because table.original_file_path is sometimes equal to None and None.startswith does not work.
So I just added a continue if clause if the table.original_file_path is equal to None.

Error Log:

  File "/Users/user/Library/Caches/pypoetry/virtualenvs/venv/lib/python3.8/site-packages/dbt_coverage/__init__.py", line 132, in filter_catalog
    if table.original_file_path.startswith(path):
AttributeError: 'NoneType' object has no attribute 'startswith'

The fix is tested successfully locally :)

fixes #52

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

Successfully merging this pull request may close these issues.

Bug when table.original_file_path is None
1 participant