Join the Kedro community

M
M
M
D
M
Members
Minura Punchihewa
M
Minura Punchihewa
Offline, last seen 2 days ago
Joined October 13, 2024

Hey guys,
I've been experimenting with packaging a Kedro project using the kedro package command and I am running into an issue.

First off, I am attempting to running it like this:

from <my-package>.__main__ import main
main(
    ["--tags", "<my-tags>", "--env", "base"]
)

Is this correct?

When I do try to run it like this, the following error is raised:
ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (/databricks/python/lib/python3.10/site-packages/typing_extensions.py)
File <command-3656540420037005>, line 2 1 from <my-package>.__main__ import main ----> 2 main( 3 ["--tags", "int_tms_hotel_reservations", "--env", "base"] 4 )

File /local_disk0/.ephemeral_nfs/envs/pythonEnv-30b382f4-147d-466f-a67b-6ce8dcc92265/lib/python3.10/site-packages/sqlalchemy/util/typing.py:56 54 from typing_extensions import TypeGuard as TypeGuard # 3.10 55 from typing_extensions import Self as Self # 3.11 ---> 56 from typing_extensions import TypeAliasType as TypeAliasType # 3.12 58 _T = TypeVar("_T", bound=Any) 59 _KT = TypeVar("_KT")
How can I overcome this? I tried upgrading the version of the typing-extensions package without any luck. The current version of this package installed on my cluster is 4.12.2.

I am running this project on Databricks and I think it is best to avoid running the package using python -m ... That is why I am looking for a Python option. I am using Kedro 0.19.4.

2 comments
R
M