DavidVujic / python-polylith-example

Example Polylith setup for Python
MIT License
51 stars 8 forks source link

ModuleNotFoundError: No module named 'bases' #12

Closed michealroberts closed 7 months ago

michealroberts commented 7 months ago

Hello again.

Having issues with following the process for building a project.

I have a similar layout to what you have outlined in your project, and after running poetry build-project I have a distribution wheel located inside ./dist directory for the project.

I use a pretty identical Dockerfile.

I then utilise the following command inside a docker-compose.yaml file:

hypercorn observatory.api.core:app --bind '[::]:5000' --reload --workers 1

I have ensured that I have added package dependencies in the pyproject.toml for the project ... as:

packages = [
    { include = "observatory/api", from = "../../bases" },
]

Yet I see the following error:

Screenshot 2024-04-05 at 13 56 29

I've obviously missed something out here, but I can't for the life of me reference what that could be ...

michealroberts commented 7 months ago

Ignore me, I don't quite know how from bases.observatory ... snuck into my code, probably auto-complete.