Skip to content

[BUG] : Docker PYTHONPATH Inconsistency #116

@Acuspeedster

Description

@Acuspeedster

name: 🐛 Bug Report
about: Create a report to help us improve FireForm.
title: "[BUG]: PYTHONPATH=/app/src breaks api imports in Docker"
labels: bug
assignees: ''

⚡️ Describe the Bug

Docker sets PYTHONPATH=/app/src, which causes inconsistent import behavior:

  • src.* imports work
  • api.* imports fail
  • Behavior differs between local and Docker environments

This creates environment-specific failures.


👣 Steps to Reproduce

  1. Run:
    make build && make up
    docker compose exec app python -c "from api.main import app"
  2. Observe ModuleNotFoundError: No module named 'api'.

📉 Expected Behavior

Both src.* and api.* imports should resolve consistently in all environments.

🖥️ Environment Information

  • OS: Docker container
  • Docker/Compose Version: Any
  • Ollama Model used: N/A

📸 Screenshots/Logs

ModuleNotFoundError: No module named 'api'

🕵️ Possible Fix

Set:
ENV PYTHONPATH=/app

instead of /app/src in:

  • Dockerfile
  • docker-compose.yml

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions