太空飞行教程常见问题解答¶
注意
如果在这里找不到你需要的答案,可以向Kedro社区寻求帮助!
如何解决这些常见错误?¶
数据集错误¶
DatasetError: 从数据集加载数据失败¶
你正在测试Kedro是否能加载原始测试数据并看到以下内容:
DatasetError: Failed while loading data from dataset
CSVDataset(filepath=...).
[Errno 2] No such file or directory: '.../companies.csv'
或者对于 shuttles 或 reviews 数据的类似错误。
三个示例数据文件是否存储在data/raw文件夹中?
DatasetNotFoundError: 目录中未找到数据集¶
您看到类似以下的错误:
DatasetNotFoundError: Dataset 'companies' not found in the catalog
您从spaceflights初始项目生成的catalog.yml版本是否有变更?请查看数据规范以确保其有效性。
在IPython会话中调用exit()并重新启动kedro ipython(或在IPython控制台中输入@kedro_reload以在不重启的情况下重新加载Kedro到会话中)。然后再次尝试。
DatasetError: 解析Dataset配置时发生异常¶
你是否看到一条显示发生异常的消息?
DatasetError: An exception occurred when parsing config for Dataset
'data_processing.preprocessed_companies':
Object 'ParquetDataset' cannot be loaded from 'kedro_datasets.pandas'. Please see the
documentation on how to install relevant dependencies for kedro_datasets.pandas.ParquetDataset:
https://docs.kedro.org/en/stable/kedro_project_setup/dependencies.html
Kedro数据目录缺少解析数据所需的依赖项。请检查您是否已包含项目所需的所有依赖项到requirements.txt文件中,然后运行pip install -r requirements.txt命令进行安装。
流水线运行¶
要成功运行流水线,所有必需的输入数据集必须已存在,否则您可能会遇到类似以下的错误:
kedro run --pipeline=data_science
2019-10-04 12:36:12,158 - kedro.io.data_catalog - INFO - Loading data from `model_input_table` (CSVDataset)...
2019-10-04 12:36:12,158 - kedro.runner.sequential_runner - WARNING - There are 3 nodes that have not run.
You can resume the pipeline run with the following command:
kedro run
Traceback (most recent call last):
...
File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.__cinit__
File "pandas/_libs/parsers.pyx", line 689, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File b'data/03_primary/model_input_table.csv' does not exist: b'data/03_primary/model_input_table.csv'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
...
raise DatasetError(message) from exc
kedro.io.core.DatasetError: Failed while loading data from dataset CSVDataset(filepath=data/03_primary/model_input_table.csv, save_args={'index': False}).
[Errno 2] File b'data/03_primary/model_input_table.csv' does not exist: b'data/03_primary/model_input_table.csv'