Skip to content

Latest commit

 

History

History
120 lines (67 loc) · 3.01 KB

File metadata and controls

120 lines (67 loc) · 3.01 KB

Troubleshooting

Local Setup

Missing local wheel/tarball dependencies

Symptom

  • pipenv sync fails with file-not-found errors for package paths in Pipfile.
  • Example pattern: No such file or directory: ../game-framework-runners/dist/...

Cause

  • This repository depends on local package artifacts from sibling repositories.

Fix

  • Build or place the required tarballs at the exact relative paths defined in Pipfile.
  • Re-run pipenv sync.

Runtime Errors

ModuleNotFoundError for server or import path issues at startup

Symptom

  • Running pipenv run uvicorn server:app ... fails to load the app module.

Cause

  • server.py is under game-app-server/, not repository root.
  • Relative import in server.py (from .engine import GameAppServer) requires package-aware execution.

Fix

  • Align package layout and startup command so module import is unambiguous.
  • Typical options:
    • Rename folder to a valid Python package name (for example game_app_server) and run with module path.
    • Or remove relative import usage if running as a flat script module.

Relative import failure: attempted relative import with no known parent package

Symptom

  • Error references from .engine import GameAppServer.

Cause

  • server.py is loaded as top-level script/module, not package member.

Fix

  • Run code as package module, or adjust imports to absolute paths matching actual layout.

Game registration/import mismatch

Symptom

  • Dynamic import failure for sample game class path.

Cause

  • registered_games contains mixed naming styles:
    • delirium-game-logic.game_logic.DeliriumLogic
    • sample-game_logic.sample_game.SampleGameLogic
  • Hyphen/underscore package naming may not match install-time import names.

Fix

  • Verify importable module names from installed packages.
  • Update registered_games values to match real Python import paths.

Integration Failures

Docker compose starts with Poetry command in a Pipenv project

Symptom

  • Compose startup fails with poetry: command not found.

Cause

  • Dockerfiles/docker-compose.yml uses poetry run ..., but repository uses Pipenv.

Fix

  • Update compose command to Pipenv-based command, or add Poetry intentionally and keep tools consistent.

initialize_server request appears to hang

Symptom

  • Calling GET /initialize_server does not return quickly.

Cause

  • GameAppServer(...) starts start_input_loop() directly in request flow.
  • Loop runs until game over and can block request handling.

Fix

  • Move game loop execution to a background worker/task model.
  • Keep request handlers non-blocking and return quickly.

API Behavior Notes

Long polling endpoints wait indefinitely

Symptom

  • GET /poll_from_server or GET /poll_to_client does not return.

Cause

  • Endpoint loops until matching message/response exists.

Fix

  • Post required data first (/post_from_client or /push_to_client).
  • Optionally add timeout handling in API implementation.