Drexel-UHC / duckdb-dbt-template

https://drexel-uhc.github.io/duckdb-dbt-template/#!/overview
2 stars 1 forks source link

Unsuccessful dbt compile: File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code #6

Closed juruchi closed 1 year ago

juruchi commented 1 year ago
PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template> cd hello
PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> python -m venv ./venv/
PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> .\venv\Scripts\activate
(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> pip install -r requirements.txt
Collecting agate==1.6.3
  Using cached agate-1.6.3-py2.py3-none-any.whl (100 kB)
Collecting attrs==22.2.0
  Using cached attrs-22.2.0-py3-none-any.whl (60 kB)
Collecting Babel==2.11.0
  Using cached Babel-2.11.0-py3-none-any.whl (9.5 MB)
Collecting certifi==2022.12.7
  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting cffi==1.15.1
  Using cached cffi-1.15.1-cp311-cp311-win_amd64.whl (179 kB)
Collecting charset-normalizer==2.1.1
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting click==8.1.3
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting colorama==0.4.5
  Using cached colorama-0.4.5-py2.py3-none-any.whl (16 kB)
Collecting dbt-core==1.3.2
  Using cached dbt_core-1.3.2-py3-none-any.whl (903 kB)
Collecting dbt-duckdb==1.3.3
  Using cached dbt_duckdb-1.3.3-py3-none-any.whl (28 kB)
Collecting dbt-extractor==0.4.1
  Using cached dbt_extractor-0.4.1-cp36-abi3-win_amd64.whl (245 kB)
Collecting duckdb==0.6.1
  Using cached duckdb-0.6.1-cp311-cp311-win_amd64.whl (9.0 MB)
Collecting future==0.18.2
  Using cached future-0.18.2.tar.gz (829 kB)
  Preparing metadata (setup.py) ... done
Collecting hologram==0.0.15
  Using cached hologram-0.0.15-py3-none-any.whl (11 kB)
Collecting idna==3.4
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting isodate==0.6.1
  Using cached isodate-0.6.1-py2.py3-none-any.whl (41 kB)
Collecting Jinja2==3.1.2
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting jsonschema==3.2.0
  Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting leather==0.3.4
  Using cached leather-0.3.4-py2.py3-none-any.whl (31 kB)
Collecting Logbook==1.5.3
  Using cached Logbook-1.5.3.tar.gz (85 kB)
  Preparing metadata (setup.py) ... done
Collecting MarkupSafe==2.1.1
  Using cached MarkupSafe-2.1.1.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
Collecting mashumaro==3.0.4
  Using cached mashumaro-3.0.4-py3-none-any.whl (55 kB)
Collecting minimal-snowplow-tracker==0.0.2
  Using cached minimal-snowplow-tracker-0.0.2.tar.gz (12 kB)
  Preparing metadata (setup.py) ... done
Collecting msgpack==1.0.4
  Using cached msgpack-1.0.4-cp311-cp311-win_amd64.whl
Collecting networkx==2.8.8
  Using cached networkx-2.8.8-py3-none-any.whl (2.0 MB)
Collecting numpy==1.24.1
  Using cached numpy-1.24.1-cp311-cp311-win_amd64.whl (14.8 MB)
Collecting packaging==21.3
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting pandas==2.0.1
  Using cached pandas-2.0.1-cp311-cp311-win_amd64.whl (10.6 MB)
Collecting parsedatetime==2.4
  Using cached parsedatetime-2.4.tar.gz (58 kB)
  Preparing metadata (setup.py) ... done
Collecting pathspec==0.9.0
  Using cached pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting polars==0.17.9
  Using cached polars-0.17.9-cp37-abi3-win_amd64.whl (18.4 MB)
Collecting pyarrow==11.0.0
  Using cached pyarrow-11.0.0-cp311-cp311-win_amd64.whl (20.5 MB)
Collecting pycparser==2.21
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting pyparsing==3.0.9
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting pyrsistent==0.19.3
  Using cached pyrsistent-0.19.3-cp311-cp311-win_amd64.whl (62 kB)
Collecting python-dateutil==2.8.2
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting python-slugify==7.0.0
  Using cached python_slugify-7.0.0-py2.py3-none-any.whl (9.4 kB)
Collecting pytimeparse==1.1.8
  Using cached pytimeparse-1.1.8-py2.py3-none-any.whl (10.0 kB)
Collecting pytz==2022.7
  Using cached pytz-2022.7-py2.py3-none-any.whl (499 kB)
Collecting PyYAML==6.0
  Using cached PyYAML-6.0-cp311-cp311-win_amd64.whl (143 kB)
Collecting requests==2.28.1
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting six==1.16.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting sqlparse==0.4.3
  Using cached sqlparse-0.4.3-py3-none-any.whl (42 kB)
Collecting text-unidecode==1.3
Collecting typing_extensions==4.4.0
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting tzdata==2023.3
  Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB)
Collecting urllib3==1.26.13
  Using cached urllib3-1.26.13-py2.py3-none-any.whl (140 kB)
Collecting Werkzeug==2.2.2
  Using cached Werkzeug-2.2.2-py3-none-any.whl (232 kB)
Requirement already satisfied: setuptools in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from jsonschema==3.2.0->-r requirements.txt (line 18)) (65.5.0)
Installing collected packages: text-unidecode, pytz, pytimeparse, msgpack, Logbook, urllib3, tzdata, typing_extensions, sqlparse, six, PyYAML, python-slugify, pyrsistent, pyparsing, 
pycparser, polars, pathspec, numpy, networkx, MarkupSafe, idna, future, dbt-extractor, colorama, charset-normalizer, certifi, Babel, attrs, Werkzeug, requests, python-dateutil, pyarrow, parsedatetime, packaging, mashumaro, leather, jsonschema, Jinja2, isodate, duckdb, click, cffi, pandas, minimal-snowplow-tracker, hologram, agate, dbt-core, dbt-duckdb
  DEPRECATION: Logbook is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for Logbook ... done
  DEPRECATION: MarkupSafe is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for MarkupSafe ... done
  DEPRECATION: future is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for future ... done
  DEPRECATION: parsedatetime is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 
23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for parsedatetime ... done
  DEPRECATION: minimal-snowplow-tracker is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 
  Running setup.py install for minimal-snowplow-tracker ... done
Successfully installed Babel-2.11.0 Jinja2-3.1.2 Logbook-1.5.3 MarkupSafe-2.1.1 PyYAML-6.0 Werkzeug-2.2.2 agate-1.6.3 attrs-22.2.0 certifi-2022.12.7 cffi-1.15.1 charset-normalizer-2.1.1 click-8.1.3 colorama-0.4.5 dbt-core-1.3.2 dbt-duckdb-1.3.3 dbt-extractor-0.4.1 duckdb-0.6.1 future-0.18.2 hologram-0.0.15 idna-3.4 isodate-0.6.1 jsonschema-3.2.0 leather-0.3.4 mashumaro-3.0.4 minimal-snowplow-tracker-0.0.2 msgpack-1.0.4 networkx-2.8.8 numpy-1.24.1 packaging-21.3 pandas-2.0.1 parsedatetime-2.4 pathspec-0.9.0 polars-0.17.9 pyarrow-11.0.0 pycparser-2.21 pyparsing-3.0.9 pyrsistent-0.19.3 python-dateutil-2.8.2 python-slugify-7.0.0 pytimeparse-1.1.8 pytz-2022.7 requests-2.28.1 six-1.16.0 sqlparse-0.4.3 text-unidecode-1.3 typing_extensions-4.4.0 tzdata-2023.3 urllib3-1.26.13

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip
(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> dbt compile
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Scripts\dbt.exe\__main__.py", line 4, in <module>
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Lib\site-packages\dbt\main.py", line 3, in <module>
    from dbt.logger import log_cache_events, log_manager
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Lib\site-packages\dbt\logger.py", line 17, in <module>
    from dbt.dataclass_schema import dbtClassMixin
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Lib\site-packages\dbt\dataclass_schema.py", line 37, in <module>
    class dbtClassMixin(DataClassDictMixin, JsonSchemaMixin):
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Lib\site-packages\mashumaro\mixins\dict.py", line 16, in __init_subclass__
    builder.add_from_dict()
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Lib\site-packages\mashumaro\core\meta\builder.py", line 419, in add_from_dict
    dialects_feature = self.is_code_generation_option_enabled(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Lib\site-packages\mashumaro\core\meta\builder.py", line 594, in is_code_generation_option_enabled
    type_name(ancestor)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Lib\site-packages\mashumaro\core\meta\helpers.py", line 150, in type_name
    elif is_generic(t) and not is_type_origin:
         ^^^^^^^^^^^^^
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\Lib\site-packages\mashumaro\core\meta\helpers.py", line 217, in is_generic
    raise NotImplementedError
NotImplementedError
(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> 
ran-codes commented 1 year ago

found a similiar error here: https://github.com/dbt-labs/dbt-core/discussions/6349

can you double check your python version:

cd hello
.\.venv\Scripts\activate
python --version

result should look like image

juruchi commented 1 year ago

After I created the issue I realized that I was not using the same python version so I downloaded 3.10 to see if that would change anything. With 3.10.11 this is what I'm now getting.

PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> python -m venv ./venv/
PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> .\venv\Scripts\activate
(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> pip install -r requirements.txt
Requirement already satisfied: agate==1.6.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 1)) (1.6.3)
Requirement already satisfied: attrs==22.2.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 2)) (22.2.0)
Requirement already satisfied: Babel==2.11.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 3)) (2.11.0)
Requirement already satisfied: certifi==2022.12.7 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 4)) (2022.12.7)   
Requirement already satisfied: cffi==1.15.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 5)) (1.15.1)
Requirement already satisfied: charset-normalizer==2.1.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 6)) (2.1.1)Requirement already satisfied: click==8.1.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 7)) (8.1.3)
Requirement already satisfied: colorama==0.4.5 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 8)) (0.4.5)
Requirement already satisfied: dbt-core==1.3.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 9)) (1.3.2)
Requirement already satisfied: dbt-duckdb==1.3.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 10)) (1.3.3)       
Requirement already satisfied: dbt-extractor==0.4.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 11)) (0.4.1)    
Requirement already satisfied: duckdb==0.6.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 12)) (0.6.1)
Requirement already satisfied: future==0.18.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 13)) (0.18.2)
Requirement already satisfied: hologram==0.0.15 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 14)) (0.0.15)       
Requirement already satisfied: isodate==0.6.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 16)) (0.6.1)
Requirement already satisfied: Jinja2==3.1.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 17)) (3.1.2)
Requirement already satisfied: jsonschema==3.2.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 18)) (3.2.0)       
Requirement already satisfied: leather==0.3.4 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 19)) (0.3.4)
Requirement already satisfied: Logbook==1.5.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 20)) (1.5.3)
Requirement already satisfied: MarkupSafe==2.1.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 21)) (2.1.1)       
Requirement already satisfied: mashumaro==3.0.4 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 22)) (3.0.4)        
Requirement already satisfied: minimal-snowplow-tracker==0.0.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 23)) 
(0.0.2)
Requirement already satisfied: msgpack==1.0.4 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 24)) (1.0.4)
Requirement already satisfied: networkx==2.8.8 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 25)) (2.8.8)
Requirement already satisfied: numpy==1.24.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 26)) (1.24.1)
Requirement already satisfied: packaging==21.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 27)) (21.3)
Requirement already satisfied: pandas==2.0.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 28)) (2.0.1)
Requirement already satisfied: parsedatetime==2.4 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 29)) (2.4)        
Requirement already satisfied: pathspec==0.9.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 30)) (0.9.0)
Requirement already satisfied: polars==0.17.9 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 31)) (0.17.9)
Requirement already satisfied: pyarrow==11.0.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 32)) (11.0.0)        
Requirement already satisfied: pycparser==2.21 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 33)) (2.21)
Requirement already satisfied: pyparsing==3.0.9 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 34)) (3.0.9)        
Requirement already satisfied: pyrsistent==0.19.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 35)) (0.19.3)     
Requirement already satisfied: python-dateutil==2.8.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 36)) (2.8.2)  
Requirement already satisfied: python-slugify==7.0.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 37)) (7.0.0)   
Requirement already satisfied: pytimeparse==1.1.8 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 38)) (1.1.8)      
Requirement already satisfied: pytz==2022.7 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 39)) (2022.7)
Requirement already satisfied: PyYAML==6.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 40)) (6.0)
Requirement already satisfied: requests==2.28.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 41)) (2.28.1)       
Requirement already satisfied: six==1.16.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 42)) (1.16.0)
Requirement already satisfied: sqlparse==0.4.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 43)) (0.4.3)
Requirement already satisfied: text-unidecode==1.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 44)) (1.3)       
Requirement already satisfied: typing_extensions==4.4.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 45)) (4.4.0)Requirement already satisfied: tzdata==2023.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 46)) (2023.3)
Requirement already satisfied: urllib3==1.26.13 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 47)) (1.26.13)      
Requirement already satisfied: Werkzeug==2.2.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 48)) (2.2.2)
Requirement already satisfied: setuptools in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from jsonschema==3.2.0->-r requirements.txt (line 18)) (65.5.0)
(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> dbt compile
15:12:03  Encountered an error:
No module named 'duckdb'
15:12:03  Traceback (most recent call last):
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\main.py", line 135, in main
    results, succeeded = handle_and_check(args)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\main.py", line 198, in handle_and_check
    task, res = run_from_args(parsed)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\main.py", line 225, in run_from_args
    task = parsed.cls.from_args(args=parsed)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\task\base.py", line 186, in from_args
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\task\base.py", line 108, in from_args
    config = cls.ConfigType.from_args(args)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\runtime.py", line 263, in from_args
    project, profile = cls.collect_parts(args)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\runtime.py", line 207, in collect_parts
    profile = cls.collect_profile(args=args)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\runtime.py", line 229, in collect_profile
    profile = cls._get_rendered_profile(args, profile_renderer, profile_name)
    return Profile.render_from_args(args, profile_renderer, profile_name)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\profile.py", line 426, in render_from_args
    return cls.from_raw_profiles(
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\profile.py", line 392, in from_raw_profiles
    return cls.from_raw_profile_info(
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\profile.py", line 346, in from_raw_profile_info
    credentials: Credentials = cls._credentials_from_profile(
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\profile.py", line 179, in _credentials_from_profile
    cls = load_plugin(typename)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\adapters\factory.py", line 201, in load_plugin
    return FACTORY.load_plugin(name)
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\adapters\factory.py", line 56, in load_plugin
    mod: Any = import_module("." + name, "dbt.adapters")
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\adapters\duckdb\__init__.py", line 2, in <module>
    from dbt.adapters.duckdb.connections import DuckDBConnectionManager  # noqa
  File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\adapters\duckdb\connections.py", line 10, in <module>
    import duckdb
ModuleNotFoundError: No module named 'duckdb'
ran-codes commented 1 year ago

great! projgress! this is the same issue as #4. A few requests

juruchi commented 1 year ago

I published the branch. python --version gives 3.10.11. FYI, I got this error when running .\.venv\Scripts\activate

(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> .\.venv\Scripts\activate
.\.venv\Scripts\activate : The term '.\.venv\Scripts\activate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the       
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ .\.venv\Scripts\activate
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.\.venv\Scripts\activate:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
ran-codes commented 1 year ago

@juruchi i made some changes in your branch and modified the setup instructions a bit. (mainly added a more detailed Python environment setup + moved everything to root).

Please start from step 1.7 Setup Local Python Environment. Please let me know if this works for you; if bugs please report here and which step.

Thanks!!

juruchi commented 1 year ago

@ran-codes It worked! FYI, in the second step of 1.8 there's an extra space in dbt –-version which was causing me to get a different output than the one shown in the screenshot.

ran-codes commented 1 year ago

YAY! 🥳 I'm glad we fixed it. (The was to specify which version of Python while setting up the local environment!!) Thank you for helping work through it.

re the extra space. Thanks for the heads up it will be fixed!

closing this issue as it has been resolved.