cube-js / cube_dbt

dbt integration for Cube
7 stars 3 forks source link

Package import throws exception with python 3.8 #4

Open vbatychko-modeln opened 12 months ago

vbatychko-modeln commented 12 months ago

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