Hi guys. Not sure if someone already reported this...
# ask-community
j
Hi guys. Not sure if someone already reported this or not. I find that I can't directly pass nested pythonic config as argument for op&asset (dagster version: 1.3.1):
Copy code
from dagster import op, Config

class DayConfig(Config):
    day: str

class FileConfig(Config):
    day_config: DayConfig

@op
def get_day(config: FileConfig) -> str:
    return config.day_config.day

get_day(config=FileConfig(day_config=DayConfig(day="2022-12-13")))
and I got following error
Copy code
>           raise DagsterInvalidConfigError(
                f"Error in config for {_get_friendly_string(configurable_def)}",
                config_evr.errors,
                config,
            )
E           dagster._core.errors.DagsterInvalidConfigError: Error in config for op
E               Error 1: Value at path root:config:day_config must be dict. Expected: "{ day: (String | { env: String }) }".
It does work if I pass dictionary version of config.
c
Hey there - yup we got a report of a very similar issue earlier in the week, fix should be out for next release. cc @ben for visibility
👍 1