Skip to content

[BUG] pyforge.shape() bypassing engine.py wrapper and leak raw vertex list to runtime #3

Description

@EliAndrewTebcherany

Describe the Bug

When calling pyforge.shape(), the function passes back a primitive Python list object instead of the expected EngineShape class container. This prevents users from configuring necessary vector states or calling physics methods, throwing AttributeError: 'list' object has no attribute 'get_physics'.

Root Cause Analysis

  1. Namespace Overlap: The compiled C extension pyforge_core.shape is overriding the Python-layer engine.shape assignment during top-level packaging imports inside __init__.py.
  2. Environment Synchronization: Editable installation states (pip install -e .) are latching onto stale virtual environment file states, caching primitive array returns rather than tracking the latest EngineShape transformations.

Fix for Tomorrow

  • Clean up the duplicate return blocks inside engine.py.
  • Restructure __init__.py to explicitly route shape calls through the class object instead of letting the native binary module bind the namespace globally.
  • Test the full physics matrix sandboxes using a completely wiped .venv cache layer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions