Eluard Camota
10/23/2023, 11:07 AMEncountered exception during execution:
Traceback (most recent call last):
File "C:\Users\KodeCraft-3\AppData\Local\Programs\Python\Python310\lib\site-packages\kedro\framework\startup.py", line 147, in _validate_source_path
source_path.relative_to(project_path)
File "C:\Users\KodeCraft-3\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 816, in relative_to
raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: 'C:\\Users\\KodeCraft-3\\AppData\\Local\\Temp\\tmpcc05q7ogprefect\\src' is not in the subpath of 'C:\\Users\\KODECR~1\\AppData\\Local\\Temp\\tmpcc05q7ogprefect' OR one path is relative and the other is absolute.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\KodeCraft-3\AppData\Local\Programs\Python\Python310\lib\site-packages\prefect\engine.py", line 829, in orchestrate_flow_run
result = await flow_call.aresult()
File "C:\Users\KodeCraft-3\AppData\Local\Programs\Python\Python310\lib\site-packages\prefect\_internal\concurrency\calls.py", line 291, in aresult
return await asyncio.wrap_future(self.future)
File "C:\Users\KodeCraft-3\AppData\Local\Programs\Python\Python310\lib\site-packages\prefect\_internal\concurrency\calls.py", line 315, in _run_sync
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\KODECR~1\AppData\Local\Temp\tmpcc05q7ogprefect\register_prefect_flow.py", line 61, in my_flow
metadata = bootstrap_project(project_path)
File "C:\Users\KodeCraft-3\AppData\Local\Programs\Python\Python310\lib\site-packages\kedro\framework\startup.py", line 174, in bootstrap_project
_add_src_to_path(metadata.source_dir, project_path)
File "C:\Users\KodeCraft-3\AppData\Local\Programs\Python\Python310\lib\site-packages\kedro\framework\startup.py", line 158, in _add_src_to_path
_validate_source_path(source_dir, project_path)
File "C:\Users\KodeCraft-3\AppData\Local\Programs\Python\Python310\lib\site-packages\kedro\framework\startup.py", line 149, in _validate_source_path
raise ValueError(
ValueError: Source path 'C:\Users\KodeCraft-3\AppData\Local\Temp\tmpcc05q7ogprefect\src' has to be relative to your project root 'C:\Users\KODECR~1\AppData\Local\Temp\tmpcc05q7ogprefect'.
07:19:56 PM
prefect.flow_runs
ERROR
Finished in state Failed("Flow run encountered an exception. ValueError: Source path 'C:\\Users\\KodeCraft-3\\AppData\\Local\\Temp\\tmpcc05q7ogprefect\\src' has to be relative to your project root 'C:\\Users\\KODECR~1\\AppData\\Local\\Temp\\tmpcc05q7ogprefect'.")
Im encountering this error, I just followed the documentationJuan Luis
10/23/2023, 11:29 AMEluard Camota
10/23/2023, 11:34 AMkedro new
, I then created a pipeline named historical_cubic_spline_iv using the command kedro create pipeline
Attached is the file structure of my project. According to the kedro docs on using prefect, I shall create a register_prefect_flow.py
on my root directory which I did.Juan Luis
10/23/2023, 11:35 AMregister_prefect_flow.py
@Eluard Camota? should be something like C:\\...\\register_prefect_flow.py
Eluard Camota
10/23/2023, 11:38 AMD:\Repositories\data-playground\register_prefect_flow.py
Juan Luis
10/23/2023, 12:38 PMC:\Users\KodeCraft-2
(or, everybody is naming their Windows users KodeCraft
? 😅)Eluard Camota
10/23/2023, 1:13 PMJuan Luis
10/23/2023, 2:01 PMEluard Camota
10/23/2023, 2:29 PMproject_path
instead of Path.cwd()
to the absolute path of the root directory, it seems like Path.cwd()
doesn't read the root directory of the project file.Juan Luis
10/23/2023, 2:34 PMEluard Camota
10/23/2023, 2:35 PMJuan Luis
10/24/2023, 7:38 AM