Hello, I’m migrating Kedro 0.18.14 to 0.19.3. I fo...
# questions
j
Hello, I’m migrating Kedro 0.18.14 to 0.19.3. I followed instructions in https://docs.kedro.org/en/stable/resources/migration.html#migrate-an-existing-project-that-uses-kedro-0-18-to-use-0-19, but got an error. I have no credentials used for the project. Could you advise how to fix?
Copy code
Traceback (most recent call last):
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/site-packages/kedro_viz/server.py", line 120, in run_server
    load_and_populate_data(
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/site-packages/kedro_viz/server.py", line 63, in load_and_populate_data
    catalog, pipelines, session_store, stats_dict = kedro_data_loader.load_data(
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/site-packages/kedro_viz/integrations/kedro/data_loader.py", line 110, in load_data
    catalog = context.catalog
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/site-packages/kedro/framework/context/context.py", line 187, in catalog
    return self._get_catalog()
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/site-packages/kedro/framework/context/context.py", line 231, in _get_catalog
    catalog: DataCatalog = settings.DATA_CATALOG_CLASS.from_config(
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/site-packages/kedro/io/data_catalog.py", line 291, in from_config
    ds_config = _resolve_credentials(  # noqa: PLW2901
  File "/anaconda/envs/kedro-dev-peanuts/lib/python3.9/site-packages/kedro/io/data_catalog.py", line 83, in _resolve_credentials
    return {k: _map_value(k, v) for k, v in config.items()}
AttributeError: 'str' object has no attribute 'items'
a
Is there a key in your catalog which looks like? -
Copy code
key: value
For interpolation keys, try prefixing them with an underscore -
Copy code
_key: value
In catalog, it’s assumed that all the entries are valid catalog entries unless they’re prefixed by an underscore
👍 2
j
Thank you @Ankita Katiyar! This solved the issue.