https://dagster.io/ logo
#ask-community
Title
# ask-community
s

Suhani Goel

05/19/2023, 4:49 AM
Hey, getting the following error while trying to use a resource :
dagster._core.errors.DagsterInvalidDefinitionError: io manager with key 'fs_io_manager' required by output 'result' of op 'get_current_block'' was not provided. Please provide a <class 'dagster._<http://core.storage.io|core.storage.io>_manager.IOManagerDefinition'> to key 'fs_io_manager', or change the required key to one of the following keys which points to an <class 'dagster._<http://core.storage.io|core.storage.io>_manager.IOManagerDefinition'>: ['io_manager']
File "/usr/local/lib/python3.10/site-packages/dagster/_grpc/server.py", line 270, in init self._loaded_repositories: Optional[LoadedRepositories] = LoadedRepositories( File "/usr/local/lib/python3.10/site-packages/dagster/_grpc/server.py", line 119, in init loadable_targets = get_loadable_targets( File "/usr/local/lib/python3.10/site-packages/dagster/_grpc/utils.py", line 37, in get_loadable_targets else loadable_targets_from_python_file(python_file, working_directory) File "/usr/local/lib/python3.10/site-packages/dagster/_core/workspace/autodiscovery.py", line 26, in loadable_targets_from_python_file loaded_module = load_python_file(python_file, working_directory) File "/usr/local/lib/python3.10/site-packages/dagster/_core/code_pointer.py", line 83, in load_python_file return import_module_from_path(module_name, python_file) File "/usr/local/lib/python3.10/site-packages/dagster/_seven/__init__.py", line 49, in import_module_from_path spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/scripts/pipelines/core/extract/__init__.py", line 8, in <module> from pipelines.core.extract.assets.chain import factory_outputs as chain_factory_outputs File "/scripts/pipelines/core/extract/__init__.py", line 8, in <module> from pipelines.core.extract.assets.chain import factory_outputs as chain_factory_outputs File "/scripts/pipelines/core/extract/assets/chain/__init__.py", line 1, in <module> from .chain import factory_outputs as chain_factory_outputs File "/scripts/pipelines/core/extract/assets/chain/chain.py", line 68, in <module> defs=Definitions( File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/definitions_class.py", line 373, in init self._created_pending_or_normal_repo = _create_repository_using_definitions_args( File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/definitions_class.py", line 256, in _create_repository_using_definitions_args def created_repo(): File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/decorators/repository_decorator.py", line 111, in call repository_definitions = fn() File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/definitions_class.py", line 258, in created_repo *with_resources(assets or [], resource_defs), File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/with_resources.py", line 105, in with_resources transformed_defs.append(cast(T, definition.with_resources(resource_defs))) File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/assets.py", line 1203, in with_resources ensure_requirements_satisfied(merged_resource_defs, list(self.get_resource_requirements())) File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/resource_requirement.py", line 225, in ensure_requirements_satisfied raise DagsterInvalidDefinitionError(
j

jamie

05/19/2023, 4:32 PM
Hey @Suhani Goel this error message is saying that one of your assets/ops needs a I/O manager named
fs_io_manager
. This would be set on the op/asset decorator like this
Copy code
@asset(
    io_manager_key="fs_io_manager"
)
but that the
fs_io_manager
is not provided in your definitions. You’ll want to update your Definitions to look like this
Copy code
defs = Definitions(
    assets[...],
    resources={
         "fs_io_manager": <whatever I/O manager you want to use>
    }
)
89 Views