Hi
I'm been trying to launch a dataflow job with flex templates in python sdk. The job starts and then fails with the error ModuleNotFoundError: No module named 'src'.
I'll provide some context:
File treeFile tree
DockerfileDockerfile
setup.pysetup.py
requirements.txtrequirements.txt
metadata.jsonmetadata.json
e_commerce_batch.py
Then, in cloud shell I run the following:
What am I missing? I don't want to move the src.processors code to the main python file (e_commerce_batch.py) because that would make that file less readable.
--
Best regards
David Regalado
Web | Linkedin | Cloudskillsboost
Solved! Go to Solution.
EUREKA!
I've solved the issue by adding save_main_session=True in my python code!
See Pickling and Managing the Main Session for more info.
--
Best regards
David Regalado
Web | Linkedin | Cloudskillsboost