Hi! Thank you for reading this question! I am depl...
# troubleshooting
c
Hi! Thank you for reading this question! I am deploying a job to Flink running in a Kubernetes environment via the CLI. In this process, I am specifying the Python script to execute using the
--python
option and passing custom modules with the
--pyfiles
option to apply them to a session job. However, imports are not working as expected. From my understanding of the Flink official documentation, using the
--pyfiles
option should add the specified directory to the
PYTHONPATH
. However, I am unable to import the modules, and I cannot figure out why, even after thoroughly reviewing the documentation. I would like to know how to check whether the
PYTHONPATH
is correctly set within the registered session job and if there are any documents or methods to better understand the internal process. Additionally, if you have an example of using these options successfully, I would greatly appreciate it if you could share it.
this is file tree in module.zip
Copy code
├── flink_modules
│   ├── __init__.py
│   ├── __pycache__
│   │   └── __init__.cpython-310.pyc
│   ├── common
│   │   ├── __init__.py
│   │   ├── __pycache__
│   │   │   └── __init__.cpython-310.pyc
│   │   ├── A
│   │   │   ├── __init__.py
│   │   │   ├── configure.py
│   │   │   └── storage_configure.py
│   │   └── B
│   │       ├── __init__.py
│   │       ├── __pycache__
│   │       │   ├── __init__.cpython-310.pyc
│   │       │   └── get_configures.cpython-310.pyc
│   │       ├── F1
│   │       └── F2
│   └── content
│       ├── __init__.py
│       ├── __pycache__
│       │   └── __init__.cpython-310.pyc
│       └── tmp
│           ├── __init__.py
│           ├── __pycache__
│           │   ├── __init__.cpython-310.pyc
│           │   ├── Q1.cpython-310.pyc
│           ├── Q1
│           ├── Q2
│           └── Q3
"from content.tmp.Q1 import function" is not working
it was solved