Skip to content

v0.7.7 - Path Handling Fix

Choose a tag to compare

@vinhnx vinhnx released this 02 Apr 07:18
· 126 commits to main since this release

Bug Fixes

This release fixes a critical issue where VT.ai failed to import modules when the project path contained spaces or special characters (e.g., 'VT.ai' directory).

Fixed Issues

  • Path Handling: Fixed ModuleNotFoundError when project path contains spaces
    • Use os.path.normpath() to properly handle paths with spaces and special characters
    • Fix import failures in directories like VT.ai or My Projects
    • Normalize path comparison when checking sys.path entries

Technical Details

  • Chainlit loads app.py as a file, not as a module
  • Paths with spaces caused sys.path.insert() to fail
  • Solution: Normalize paths using os.path.normpath() before adding to sys.path

Installation

# Install from PyPI
pip install --upgrade vtai

# Or install globally with uv
uv tool install --python 3.11 vtai

# Run from any directory
vtai