I use VS Code for Python and I have the following file structure:
--src
----transform
------text
--------text.py
----transform.py
So as you can see, I have a src file, inside I have transform file and inside transform there's a text file that contains text.py python file with class Text. Meanwhile, inside the transform file there's a transform.py python file. Inside this transform.py file I import text as
from src.transform.text.text import Text. This was auto-imported from vsc so I didn't practically did it and it doesn't show any errors when I test it locally. However, when deployed, I get the error ModuleNotFoundError: No module named src..
Regarding this, I have multiple questions:
- Why is the vsc code importing not correct?
- Can you suggest some vsc code python importer?
- How can I fix this, i.e is there some convention to follow regarding this? It works on my computer joke is present here, but deployed it throws an error.