Skip to content

Package import throws exception with python 3.8 #4

@vbatychko-modeln

Description

@vbatychko-modeln

Hi,

Getting this error when trying to use package with python 3.8.16:

$ python3.8 dbt_to_cube.py                                                                                                                                                                                     Traceback (most recent call last):
  File "dbt_to_cube.py", line 1, in <module>
    from cube_dbt import Dbt
  File "/home/user/.local/lib/python3.8/site-packages/cube_dbt/__init__.py", line 2, in <module>
    from .dbt import Dbt
  File "/home/user/.local/lib/python3.8/site-packages/cube_dbt/dbt.py", line 4, in <module>
    from cube_dbt.model import Model
  File "/home/user/.local/lib/python3.8/site-packages/cube_dbt/model.py", line 4, in <module>
    class Model:
  File "/home/user/.local/lib/python3.8/site-packages/cube_dbt/model.py", line 52, in Model
    def columns(self) -> list[Column]:
TypeError: 'type' object is not subscriptable

Googling gave me following https://stackoverflow.com/a/75317316

Manually patching files:
cube_dbt/model.py
cube_dbt/dbt.py

fixes issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions