[Bug] TypeError: __post_serialize__() takes 2 positional arguments but 3 were given
popcornylu opened this issue · 2 comments
popcornylu commented
Is this a new bug in dbt-core?
- I believe this is a new bug in dbt-core
- I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
Cannot run any dbt subcommand. Exit with exception. Please see the log below.
Expected Behavior
Should run successfully
Steps To Reproduce
- Update to the lastest dbt-core.
dbt-core==1.8.0
- Run the
dbt run
(or other dbt subcommand, list, parse)
Relevant log output
�[0m13:44:35.107219 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x102a11460>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x105909bb0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x105909d60>]}
============================== 13:44:35.110287 | c1779630-42a6-4a47-842b-a5551cc89e80 ==============================
�[0m13:44:35.110287 [info ] [MainThread]: Running with dbt=1.8.0
�[0m13:44:35.110712 [debug] [MainThread]: running dbt with arguments {'printer_width': '80', 'indirect_selection': 'eager', 'log_cache_events': 'False', 'write_json': 'True', 'partial_parse': 'True', 'cache_selected_only': 'False', 'profiles_dir': '/Users/popcorny/Documents/infuseai/repo/dbt-infusetude', 'version_check': 'True', 'debug': 'False', 'log_path': '/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/logs', 'fail_fast': 'False', 'warn_error': 'None', 'use_colors': 'True', 'use_experimental_parser': 'False', 'no_print': 'None', 'quiet': 'False', 'log_format': 'default', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptions(include=[], exclude=[])', 'introspect': 'True', 'target_path': 'None', 'invocation_command': 'dbt run', 'send_anonymous_usage_stats': 'True'}
�[0m13:44:35.301640 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'c1779630-42a6-4a47-842b-a5551cc89e80', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x106f4fb50>]}
�[0m13:44:35.337758 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'c1779630-42a6-4a47-842b-a5551cc89e80', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x1058b8220>]}
�[0m13:44:35.338373 [info ] [MainThread]: Registered adapter: snowflake=1.8.0
�[0m13:44:35.361985 [debug] [MainThread]: checksum: dbb12d416fdb55e3665e4828703bbedf40c5c90ed7ca6ff39bbbfb29b12b0a92, vars: {}, profile: , target: , version: 1.8.0
�[0m13:44:35.362746 [info ] [MainThread]: Unable to do partial parsing because saved manifest not found. Starting full parse.
�[0m13:44:35.363055 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': 'c1779630-42a6-4a47-842b-a5551cc89e80', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x107178a30>]}
�[0m13:44:36.283492 [error] [MainThread]: Encountered an error:
__post_serialize__() takes 2 positional arguments but 3 were given
�[0m13:44:36.287429 [error] [MainThread]: Traceback (most recent call last):
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/cli/requires.py", line 138, in wrapper
result, success = func(*args, **kwargs)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/cli/requires.py", line 101, in wrapper
return func(*args, **kwargs)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/cli/requires.py", line 218, in wrapper
return func(*args, **kwargs)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/cli/requires.py", line 247, in wrapper
return func(*args, **kwargs)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/cli/requires.py", line 294, in wrapper
return func(*args, **kwargs)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/cli/requires.py", line 320, in wrapper
ctx.obj["manifest"] = parse_manifest(
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/manifest.py", line 1898, in parse_manifest
manifest = ManifestLoader.get_full_manifest(
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/manifest.py", line 330, in get_full_manifest
manifest = loader.load()
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/manifest.py", line 435, in load
self.parse_project(
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/manifest.py", line 733, in parse_project
parser.parse_file(block)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/base.py", line 484, in parse_file
self.parse_node(file_block)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/base.py", line 445, in parse_node
self.render_update(node, config)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/models.py", line 348, in render_update
super().render_update(node, config)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/base.py", line 421, in render_update
context = self.render_with_context(node, config)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/base.py", line 266, in render_with_context
context = self._context_for(parsed_node, config)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/parser/base.py", line 260, in _context_for
return generate_parser_model_context(parsed_node, self.root_project, self.manifest, config)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/context/providers.py", line 1612, in generate_parser_model_context
return ctx.to_dict()
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/context/manifest.py", line 60, in to_dict
dct = super().to_dict()
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/context/base.py", line 204, in to_dict
builtins = self.generate_builtins()
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/context/base.py", line 197, in generate_builtins
value = value.__get__(self)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/context/providers.py", line 1330, in ctx_model
model_dct = self.model.to_dict(omit_none=True)
File "<string>", line 3, in __mashumaro_to_dict__
File "<string>", line 107, in __mashumaro_to_dict__
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/artifacts/resources/v1/model.py", line 31, in __post_serialize__
dct = super().__post_serialize__(dct, context)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/artifacts/resources/v1/components.py", line 225, in __post_serialize__
dct = super().__post_serialize__(dct, context)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/contracts/graph/nodes.py", line 266, in __post_serialize__
dct = super().__post_serialize__(dct, context)
File "/Users/popcorny/Documents/infuseai/repo/dbt-infusetude/venv/lib/python3.9/site-packages/dbt/artifacts/resources/v1/components.py", line 200, in __post_serialize__
dct = super().__post_serialize__(dct, context)
TypeError: __post_serialize__() takes 2 positional arguments but 3 were given
�[0m13:44:36.289085 [debug] [MainThread]: Resource report: {"command_name": "run", "command_wall_clock_time": 1.2229981, "process_user_time": 1.698656, "process_kernel_time": 0.116945, "process_mem_max_rss": "118947840", "command_success": false, "process_in_blocks": "0", "process_out_blocks": "0"}
�[0m13:44:36.289636 [debug] [MainThread]: Command `dbt run` failed at 13:44:36.289574 after 1.22 seconds
�[0m13:44:36.289966 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x102a11460>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x102e6b250>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x107188580>]}
�[0m13:44:36.290296 [debug] [MainThread]: Flushing usage events
Environment
- OS: MacOS
- Python: v3.9.7
- dbt:1.8.0
Core:
- installed: 1.8.0
- latest: 1.8.0 - Up to date!
Plugins:
- snowflake: 1.8.0 - Up to date!
### Which database adapter are you using with dbt?
snowflake
### Additional Context
1.8.0 (failed)
1.8.0rc2 (failed)
1.8.0rc1 (ok)
popcornylu commented
I cannot reproduce it once i recreate the venv and pip install the dbt-core
and dbt-snowflake
jtcohen6 commented
@popcornylu I think you may have had an outdated install of dbt-common
and dbt-adapters
.
We should bump the minimum bounds of those to ensure that pip
upgrades to compatible versions.
Glad you were able to get this sorted in the meantime!