https://dagster.io/ logo
#ask-ai
Title
# ask-ai
a

Alex Noonan

02/15/2024, 10:03 AM
Hi @Scout what does this error mean: dagster._core.errors.DagsterUserCodeLoadError: Error occurred during the loading of Dagster definitions in executable_path=C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\Scripts\python.exe, module_name=linden_dw, working_directory=C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_grpc\server.py", line 408, in init self._loaded_repositories: Optional[LoadedRepositories] = LoadedRepositories( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_grpc\server.py", line 235, in init with user_code_error_boundary( File "C:\Users\Owner\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_core\errors.py", line 297, in user_code_error_boundary raise new_error from e The above exception was caused by the following exception: TypeError: Emitter.__init__() got an unexpected keyword argument 'buffer_size' File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_core\errors.py", line 287, in user_code_error_boundary yield File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_grpc\server.py", line 242, in init loadable_targets = get_loadable_targets( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_grpc\utils.py", line 50, in get_loadable_targets else loadable_targets_from_python_module(module_name, working_directory) File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_core\workspace\autodiscovery.py", line 35, in loadable_targets_from_python_module module = load_python_module( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_core\code_pointer.py", line 135, in load_python_module return importlib.import_module(module_name) File "C:\Users\Owner\AppData\Local\Programs\Python\Python310\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\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden_dw\__init__.py", line 10, in <module> from .assets import dbt_manifest_path, DBT_PROJECT_DIR File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden_dw\assets\__init__.py", line 1, in <module> from dagster_dbt import ( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster_dbt\__init__.py", line 20, in <module> from .core import ( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster_dbt\core\__init__.py", line 5, in <module> from .resources_v2 import ( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster_dbt\core\resources_v2.py", line 38, in <module> from dbt.contracts.results import NodeStatus, TestStatus File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\contracts\results.py", line 3, in <module> from dbt.contracts.graph.unparsed import FreshnessThreshold File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\contracts\graph\unparsed.py", line 4, in <module> from dbt import deprecations File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\deprecations.py", line 6, in <module> import dbt.tracking File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\tracking.py", line 104, in <module> emitter = TimeoutEmitter() File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\tracking.py", line 54, in init super().__init__(
s

Scout

02/15/2024, 10:03 AM
The error message you're encountering,
dagster._core.errors.DagsterUserCodeLoadError
, indicates that there was a problem loading Dagster definitions from user code during the initialization of a gRPC server in Dagster. This error is a type of
DagsterUserCodeExecutionError
, which is raised when there is an issue with user code that Dagster is attempting to execute. The specific cause of the error is a
TypeError
that occurred because an unexpected keyword argument
buffer_size
was passed to the
Emitter.__init__()
method. This suggests that there is a mismatch between the expected arguments of the
Emitter
class constructor and the arguments that were provided. The stack trace shows that the error originated from the
dbt.tracking
module, which is part of the
dbt
(data build tool) package. It seems that the
TimeoutEmitter
class, which is likely a subclass of
Emitter
, is being initialized with an argument that it does not expect. To resolve this issue, you should: 1. Check the version of the
dbt
package you are using and ensure it is compatible with the version of
dagster_dbt
you have installed. It's possible that there is a version incompatibility causing this error. 2. Review the code in the
dbt.tracking
module, particularly the
TimeoutEmitter
class, to understand what arguments it expects during initialization. 3. If you have recently upgraded any packages, consider reverting to earlier versions that were known to work together without issues. If you continue to experience issues after checking these points, you may need to seek further assistance from the Dagster community or support channels, as the error is occurring within the
dbt
package, which is integrated with Dagster through the
dagster_dbt
library.
a

Alex Noonan

02/15/2024, 10:26 AM
@Scout I updated all my dbt dependencies and Dagster version and got this error: dagster._core.errors.DagsterUserCodeLoadError: Error occurred during the loading of Dagster definitions in executable_path=C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\Scripts\python.exe, module_name=linden_dw, working_directory=C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_grpc\server.py", line 408, in init self._loaded_repositories: Optional[LoadedRepositories] = LoadedRepositories( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_grpc\server.py", line 235, in init with user_code_error_boundary( File "C:\Users\Owner\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_core\errors.py", line 297, in user_code_error_boundary raise new_error from e The above exception was caused by the following exception: TypeError: Emitter.__init__() got an unexpected keyword argument 'buffer_size' File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_core\errors.py", line 287, in user_code_error_boundary yield File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_grpc\server.py", line 242, in init loadable_targets = get_loadable_targets( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_grpc\utils.py", line 50, in get_loadable_targets else loadable_targets_from_python_module(module_name, working_directory) File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_core\workspace\autodiscovery.py", line 35, in loadable_targets_from_python_module module = load_python_module( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster\_core\code_pointer.py", line 135, in load_python_module return importlib.import_module(module_name) File "C:\Users\Owner\AppData\Local\Programs\Python\Python310\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\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden_dw\__init__.py", line 10, in <module> from .assets import dbt_manifest_path, DBT_PROJECT_DIR File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden_dw\assets\__init__.py", line 1, in <module> from dagster_dbt import ( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster_dbt\__init__.py", line 20, in <module> from .core import ( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster_dbt\core\__init__.py", line 5, in <module> from .resources_v2 import ( File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dagster_dbt\core\resources_v2.py", line 39, in <module> from dbt.contracts.results import NodeStatus, TestStatus File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\contracts\results.py", line 3, in <module> from dbt.contracts.graph.unparsed import FreshnessThreshold File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\contracts\graph\unparsed.py", line 4, in <module> from dbt import deprecations File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\deprecations.py", line 6, in <module> import dbt.tracking File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\tracking.py", line 104, in <module> emitter = TimeoutEmitter() File "C:\Users\Owner\Documents\GitHub\Linden\linden-warehouse-bigquery\linden-dw\lib\site-packages\dbt\tracking.py", line 54, in init super().__init__(
s

Scout

02/15/2024, 10:26 AM
The error
dagster._core.errors.DagsterUserCodeLoadError
indicates that there was an issue loading user code in Dagster. The specific problem is a
TypeError
related to the
Emitter.__init__()
method receiving an unexpected keyword argument
buffer_size
. This error is occurring within the
dbt.tracking
module, which suggests that there might be a compatibility issue between the versions of
dbt
and
dagster_dbt
you are using. Even though you have updated all your dbt dependencies and Dagster version, the error persists, which means the issue might not be solely related to the version mismatch. Here are some steps you can take to troubleshoot this issue: 1. Check for Breaking Changes: Ensure that there are no breaking changes in the versions of
dbt
and
dagster_dbt
that you have updated to. Sometimes, newer versions introduce changes that are not backward compatible. 2. Review the
dbt
and
dagster_dbt
Release Notes
: Look for any notes on changes to the
Emitter
class or its initialization parameters in the release notes of
dbt
and
dagster_dbt
. 3. Check for Open Issues: Look for any open issues or discussions in the Dagster and dbt repositories that might be related to this error. Other users might have encountered the same problem, and there might be a discussion about a workaround or a fix. 4. Revert to Known Good Configuration: If you had a working set of versions before the update, consider reverting to those versions to get your environment back to a working state while you investigate the issue further. 5. Isolate the Problem: Try to isolate the problem by creating a minimal Dagster setup that only includes the dbt integration. This can help determine if the issue is with the integration itself or something specific in your codebase. 6. Seek Support: If you are unable to resolve the issue, consider reaching out to the Dagster community or support channels for assistance. Provide them with the details of the error, the versions of
dbt
and
dagster_dbt
you are using, and any other relevant information. Remember to ensure that your environment is clean and that there are no residual files from previous installations that might be causing conflicts. It's also a good practice to use virtual environments to manage dependencies and avoid version conflicts.
10 Views