https://kedro.org/ logo
#questions
Title
# questions
a

Adriana Arneson

12/13/2023, 7:55 PM
Hi, I am using custom resolvers in my project based on the solution here (https://kedro-org.slack.com/archives/C03RKP2LW64/p1694437194696799), and it worked beautifully for my purpose, but this seems to break my
kedro viz
. I attached my
settings.py
as well for the custom class. Hoping some of the more experienced folks here can help as all my searches for kedro viz and custom resolvers haven't yielded much. In my catalog I have a CPseries.path entry that is set to ${runtimeParam:quant_folder}. Wondering if maybe kedro viz just isn't meant to be compatible with this "hacky" approach? Thanks in advance.
Copy code
$ kedro viz               
WARNING: The `kedro viz` command will be deprecated with the release of Kedro-Viz 7.0.0. `kedro viz run` will be the new way to run the tool.
Starting Kedro Viz Backend Server...
Process Process-1:
Traceback (most recent call last):
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/kedro_viz/server.py", line 91, in run_server
    catalog, pipelines, session_store, stats_dict = kedro_data_loader.load_data(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/kedro_viz/integrations/kedro/data_loader.py", line 146, in load_data
    catalog = context.catalog
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/kedro/framework/context/context.py", line 226, in catalog
    return self._get_catalog()
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/kedro/framework/context/context.py", line 269, in _get_catalog
    conf_catalog = self.config_loader["catalog"]
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/kedro/config/omegaconf_config.py", line 200, in __getitem__
    base_config = self.load_and_merge_dir_config(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/kedro/config/omegaconf_config.py", line 340, in load_and_merge_dir_config
    for k, v in OmegaConf.to_container(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/omegaconf.py", line 573, in to_container
    return BaseContainer._to_content(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/basecontainer.py", line 292, in _to_content
    value = get_node_value(key)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/basecontainer.py", line 247, in get_node_value
    value = BaseContainer._to_content(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/basecontainer.py", line 292, in _to_content
    value = get_node_value(key)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/basecontainer.py", line 244, in get_node_value
    conf._format_and_raise(key=key, value=None, cause=e)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/base.py", line 231, in _format_and_raise
    format_and_raise(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/_utils.py", line 899, in format_and_raise
    _raise(ex, cause)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/_utils.py", line 797, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set env var OC_CAUSE=1 for full trace
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/basecontainer.py", line 242, in get_node_value
    node = node._dereference_node()
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/base.py", line 246, in _dereference_node
    node = self._dereference_node_impl(throw_on_resolution_failure=True)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/base.py", line 277, in _dereference_node_impl
    return parent._resolve_interpolation_from_parse_tree(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/base.py", line 584, in _resolve_interpolation_from_parse_tree
    resolved = self.resolve_parse_tree(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/base.py", line 769, in resolve_parse_tree
    raise InterpolationResolutionError(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/base.py", line 764, in resolve_parse_tree
    return visitor.visit(parse_tree)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/antlr4/tree/Tree.py", line 34, in visit
    return tree.accept(self)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/grammar/gen/OmegaConfGrammarParser.py", line 206, in accept
    return visitor.visitConfigValue(self)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/grammar_visitor.py", line 101, in visitConfigValue
    return self.visit(ctx.getChild(0))
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/antlr4/tree/Tree.py", line 34, in visit
    return tree.accept(self)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/grammar/gen/OmegaConfGrammarParser.py", line 342, in accept
    return visitor.visitText(self)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/grammar_visitor.py", line 298, in visitText
    return self.visitInterpolation(c)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/grammar_visitor.py", line 125, in visitInterpolation
    return self.visit(ctx.getChild(0))
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/antlr4/tree/Tree.py", line 34, in visit
    return tree.accept(self)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/grammar/gen/OmegaConfGrammarParser.py", line 1041, in accept
    return visitor.visitInterpolationResolver(self)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/grammar_visitor.py", line 179, in visitInterpolationResolver
    return self.resolver_interpolation_callback(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/base.py", line 750, in resolver_interpolation_callback
    return self._evaluate_custom_resolver(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/base.py", line 694, in _evaluate_custom_resolver
    return resolver(
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/omegaconf/omegaconf.py", line 445, in resolver_wrapper
    ret = resolver(*args, **kwargs)
  File "/Users/adrianaarneson/projects/prot-kd-fitting/src/prot_kd_fitting/settings.py", line 38, in <lambda>
    self.register_custom_resolver("runtimeParam", lambda x: self.runtime_params[x])
omegaconf.errors.InterpolationResolutionError: KeyError raised while resolving interpolation: 'quant_folder'
    full_key: CPseries.path
    object_type=dict
Traceback (most recent call last):
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/kedro_viz/launchers/cli.py", line 166, in viz
    _wait_for(func=_check_viz_up, host=host, port=port)
  File "/Users/adrianaarneson/miniconda3/envs/py310/lib/python3.10/site-packages/kedro_viz/launchers/utils.py", line 56, in _wait_for
    raise WaitForException(
kedro_viz.launchers.utils.WaitForException: func: <function _check_viz_up at 0x1060a85e0>, didn't return True within specified timeout: 60
kedro.framework.cli.utils.KedroCliError: func: <function _check_viz_up at 0x1060a85e0>, didn't return True within specified timeout: 60
Run with --verbose to see the full exception
Error: func: <function _check_viz_up at 0x1060a85e0>, didn't return True within specified timeout: 60
2 Views