You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then, in the app/main.py I am trying to import user from the api-directory by doing: from app.api import user
When running the container, the following error is thrown. ModuleNotFoundError: No module named 'app'
This is probably because app is not in the PYTHONPATH. I have tried to add it to the Dockerfile, but this did not help.
I want to keep the structure and the way of importing it as is as it is also needed by my test setup.
How can I fix this? The problem has probably a very trivial solution, but I am currently stuck.
Thanks in advance
The text was updated successfully, but these errors were encountered:
Hi, the error as mentioned in the title is thrown when running the container. Below I tried to describe my setup in detail.
I have setup everything exactly as described in the readme. Therefore, this is how my Dockerfile looks like.
my directory structure is as follows.
then, in the
app/main.py
I am trying to importuser
from theapi
-directory by doing:from app.api import user
When running the container, the following error is thrown.
ModuleNotFoundError: No module named 'app'
This is probably because
app
is not in the PYTHONPATH. I have tried to add it to the Dockerfile, but this did not help.I want to keep the structure and the way of importing it as is as it is also needed by my test setup.
How can I fix this? The problem has probably a very trivial solution, but I am currently stuck.
Thanks in advance
The text was updated successfully, but these errors were encountered: