kopf icon indicating copy to clipboard operation
kopf copied to clipboard

Using named import in kopf

Open skandarchahbouni opened this issue 1 year ago • 0 comments

Long story short

I want to use named import in kopf:

  • from module.functions import function_1

kopf provides a -m option for that, however, it doesn't work and it always throw the ModuleNotFoundError error. command used : kopf run -m package_2.main I ran the same file using python -m, but it didn't trigger the ModuleNotFoundError error. as shown in the screenshot below:

image image

if I use just kopf run without -m option, I the no No module named error (same as running python main.py without -m option.

Kopf version

No response

Kubernetes version

No response

Python version

No response

Code

No response

Logs

No response

Additional information

No response

skandarchahbouni avatar Jan 05 '24 17:01 skandarchahbouni