Skip to content

fix(gensui): add missing bcrypt and pyjwt dependencies#12

Open
wstlima wants to merge 1 commit into
AlphaHorizon-AI:mainfrom
wstlima:fix/gensui-missing-auth-deps
Open

fix(gensui): add missing bcrypt and pyjwt dependencies#12
wstlima wants to merge 1 commit into
AlphaHorizon-AI:mainfrom
wstlima:fix/gensui-missing-auth-deps

Conversation

@wstlima

@wstlima wstlima commented Jul 10, 2026

Copy link
Copy Markdown

Fixes #3

Summary

  • gensui/services/auth_service.py imports bcrypt and jwt but neither is declared in pyproject.toml
  • Container crashes on startup as soon as any route imports auth_service

Reproduction (before fix)

cd gensui && docker compose up -d --build
docker compose logs gensui
# ModuleNotFoundError: No module named 'bcrypt'
# (after adding bcrypt) ModuleNotFoundError: No module named 'jwt'

Test plan

  • Verified no other undeclared third-party imports in gensui/ via grep of all import statements
  • Container starts cleanly after fix
  • GET /api/gensui/health returns {"status":"ok",...}

gensui/services/auth_service.py imports both `bcrypt` (line 8) and
`jwt` (line 9) but neither is declared in pyproject.toml. The Docker
build succeeds (no static import check at build time), but the
container crashes on startup as soon as any route imports
auth_service — which happens immediately via app.py's router
registration.

Reproduction (Docker):
  cd gensui && docker compose up -d --build
  docker compose logs gensui

Traceback (before fix):
  File "/app/gensui/services/auth_service.py", line 8, in <module>
    import bcrypt
  ModuleNotFoundError: No module named 'bcrypt'

After adding bcrypt, the next import fails the same way:
  File "/app/gensui/services/auth_service.py", line 9, in <module>
    import jwt
  ModuleNotFoundError: No module named 'jwt'

Fix: add both packages to pyproject.toml dependencies. Verified the
full gensui/ import surface has no other undeclared third-party
imports:
  find gensui -name "*.py" | xargs grep -hE "^import |^from " \
    | sed -E 's/^(import|from) ([a-zA-Z0-9_]+).*/\2/' | sort -u

After fix: container starts cleanly, GET /api/gensui/health returns
{"status":"ok","service":"gensui","version":"0.1.0"}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gensui Docker install crashes on boot: bcrypt and pyjwt missing from pyproject.toml

1 participant