Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presence of hidden directories inside pipelines produces warning #3194

Closed
astrojuanlu opened this issue Oct 18, 2023 · 2 comments
Closed

Presence of hidden directories inside pipelines produces warning #3194

astrojuanlu opened this issue Oct 18, 2023 · 2 comments

Comments

@astrojuanlu
Copy link
Member

astrojuanlu commented Oct 18, 2023

Description

https://stackoverflow.com/q/77314748/554319

PS D:\Files\IA divers\kedro_mnist\kedro-mnist> kedro run --pipeline pipeline
[10/18/23 11:49:05] INFO     Kedro project kedro-mnist                                                   session.py:364
                    WARNING  c:\users\rashid\anaconda3\lib\site-packages\kedro\framework\project\__init warnings.py:109
                             __.py:359: UserWarning: An error occurred while importing the
                             'kedro_mnist.pipelines..ipynb_checkpoints' module. Nothing defined therein
                             will be returned by 'find_pipelines'.

                             Traceback (most recent call last):
                               File
                             "c:\users\rashid\anaconda3\lib\site-packages\kedro\framework\project\__ini
                             t__.py", line 357, in find_pipelines
                                 pipeline_module = importlib.import_module(pipeline_module_name)
                               File "c:\users\rashid\anaconda3\lib\importlib\__init__.py", line 127, in
                             import_module
                                 return _bootstrap._gcd_import(name[level:], package, level)
                               File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
                               File "<frozen importlib._bootstrap>", line 991, in _find_and_load
                               File "<frozen importlib._bootstrap>", line 961, in
                             _find_and_load_unlocked
                               File "<frozen importlib._bootstrap>", line 219, in
                             _call_with_frames_removed
                               File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
                               File "<frozen importlib._bootstrap>", line 991, in _find_and_load
                               File "<frozen importlib._bootstrap>", line 973, in
                             _find_and_load_unlocked
                             ModuleNotFoundError: No module named 'kedro_mnist.pipelines.'

                               warnings.warn(

┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ c:\users\rashid\anaconda3\lib\site-packages\kedro\framework\session\session.py:381 in run        │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\kedro\framework\project\__init__.py:137 in inner     │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
KeyError: 'pipeline'

The above exception was the direct cause of the following exception:

┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ c:\users\rashid\anaconda3\lib\runpy.py:194 in _run_module_as_main                                │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\runpy.py:87 in _run_code                                           │
│                                                                                                  │
│ in <module>:7                                                                                    │
│                                                                                                  │
│   4 from kedro.framework.cli import main                                                         │
│   5 if __name__ == '__main__':                                                                   │
│   6 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                         │
│ > 7 │   sys.exit(main())                                                                         │
│   8                                                                                              │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\kedro\framework\cli\cli.py:211 in main               │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\click\core.py:1157 in __call__                       │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\kedro\framework\cli\cli.py:139 in main               │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\click\core.py:1078 in main                           │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\click\core.py:1688 in invoke                         │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\click\core.py:1434 in invoke                         │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\click\core.py:783 in invoke                          │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\kedro\framework\cli\project.py:453 in run            │
│                                                                                                  │
│ c:\users\rashid\anaconda3\lib\site-packages\kedro\framework\session\session.py:383 in run        │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
ValueError: Failed to find the pipeline named 'pipeline'. It needs to be generated and returned by the
'register_pipelines' function.

Steps to Reproduce

  1. kedro new --starter=spaceflights
  2. mkdir src/spaceflights/pipelines/.ipynb_checkpoints/
  3. kedro registry list

Expected Result

Directories that are not Python packages should be ignored.

Your Environment

  • Kedro version used (pip show kedro or kedro -V): 0.18.13 and main branch (almost 0.18.14)
  • Python version used (python -V): 3.10
  • Operating system and version: macOS Ventura
@merelcht
Copy link
Member

@astrojuanlu Do you know if this is still an issue? This fix #3021 looks kind of related?

@astrojuanlu
Copy link
Member Author

I tried with Kedro 0.19.3 and this seems fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants