C4W1 Assignment 'Data Modeling with DBT' Lab parsing error

Hi team,

When I was working on the assignment tonight, I kept getting this error when I ran “dbt run” (or “dbt run -s star_schema”) (screenshot also attached):

07:20:20 Running with dbt=1.8.1
07:20:20 Registered adapter: postgres=1.8.1
07:20:20 Unable to do partial parsing because saved manifest not found. Starting full parse.
07:20:23 Encountered an error:
unhashable type: ‘list’
07:20:24 Traceback (most recent call last):
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/cli/requires.py”, line 138, in wrapper
result, success = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/cli/requires.py”, line 101, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/cli/requires.py”, line 218, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/cli/requires.py”, line 247, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/cli/requires.py”, line 294, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/cli/requires.py”, line 320, in wrapper
ctx.obj[“manifest”] = parse_manifest(
^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/manifest.py”, line 1898, in parse_manifest
manifest = ManifestLoader.get_full_manifest(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/manifest.py”, line 330, in get_full_manifest
manifest = loader.load()
^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/manifest.py”, line 435, in load
self.parse_project(
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/manifest.py”, line 733, in parse_project
parser.parse_file(block)
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/base.py”, line 484, in parse_file
self.parse_node(file_block)
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/base.py”, line 445, in parse_node
self.render_update(node, config)
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/models.py”, line 348, in render_update
super().render_update(node, config)
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/base.py”, line 421, in render_update
context = self.render_with_context(node, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/parser/base.py”, line 270, in render_with_context
get_rendered(parsed_node.raw_code, context, parsed_node, capture_macros=True)
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/clients/jinja.py”, line 146, in get_rendered
rendered = render_template(template, ctx, node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt_common/clients/jinja.py”, line 572, in render_template
return template.render(ctx)
^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt_common/clients/jinja.py”, line 163, in render
return self.environment.handle_exception()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/jinja2/environment.py”, line 939, in handle_exception
raise rewrite_traceback_stack(source=source)
File “”, line 14, in top-level template code
File “/home/coder/miniconda/lib/python3.12/site-packages/jinja2/sandbox.py”, line 394, in call
return __context.call(__obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/context/base.py”, line 173, in call
if self.has_var(var_name):
^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/context/base.py”, line 162, in has_var
return var_name in self._merged
^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/utils.py”, line 323, in contains
return any((name in entry for entry in self._itersource()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/dbt/utils.py”, line 323, in
return any((name in entry for entry in self._itersource()))
^^^^^^^^^^^^^
TypeError: unhashable type: ‘list’

I am not sure what caused the error, but it seems like an installed dbt-core issue? What can we do here? I want to finish the assignment. Please kindly advise at your earliest convenience. Thank you!

Best regards,’
Xiao “Susie” Bai

Hello @susie_bx
The main exception message is TypeError: unhashable type: ‘list’. Therefore, I don’t think it has to do with the dbt-core installation. My guess is that the error is stemming from an error in the completion of the SQL files in the ./classicmodels_modeling/models. I suggest you go through the steps one more time and make sure that you are filling all the files according to the instructions.

I just passed the assignment. Thank you very much for your reminder @Amir_Zare!

i did redo this 3 times, but I still get the error. Can someone share where more precisely to look at? thanks

I fixed it… i had {{var[“source_schema”]}} - square brackets instead of (). That is why it is calling for unhashable “list”

Hi @Amir_Zare : getting below error when I ran dbt run -s star_schema

{{ dbt_date.get_date_dimension(“YYYY-MM-DD”, “YYYY-MM-DD”) }}

Any particular reason for this error

Database Error in model dates (models/star_schema/dates.sql)
invalid input syntax for type timestamp: “YYYY-MM-DD”
LINE 5: ((cast(‘YYYY-MM-DD’ as timestamp))::date - (cast('YY…

@Amir_Zare @TMosh

Any update on how to solve the above mentioned issue

Sorry, I’m not a mentor for this course.

@TMosh : Any idea who is mentor for this course or how to find out who is mentor for this course

I’ll check and send them a notification.

Thanks @TMosh

@Amir_Zare: I will proceed next step but now after running the command “dbt run -s star_schema” the dimension and fact tables are getting created under source schema (classicmodels) itself and not inside classicmodels_star_schema. Not sure why it is happening, any pointers to resolve this issue

@ Georgios: after running the command “dbt run -s star_schema” the dimension and fact tables are getting created under source schema (classicmodels) itself and not inside classicmodels_star_schema. Not sure why it is happening, any pointers to resolve this issue

Hello @vijaybhangale

You are probably missing step 3.2.2. Please, follow the instructions carefully, and you will be good to go.