| |
| """ |
| Test script to verify that all imports work correctly |
| """ |
|
|
| import sys |
| import os |
|
|
| |
| current_dir = os.path.dirname(os.path.abspath(__file__)) |
| sys.path.insert(0, current_dir) |
|
|
| print("Current working directory:", os.getcwd()) |
| print("Current directory:", current_dir) |
| print("Python path:", sys.path) |
|
|
| try: |
| print("Testing import of controller module...") |
| import controller |
| print("โ controller module imported successfully") |
| except ImportError as e: |
| print("โ Failed to import controller module:", e) |
|
|
| try: |
| print("Testing import of controller.pix2text_controller...") |
| from controller.pix2text_controller import pix2text_bp |
| print("โ controller.pix2text_controller imported successfully") |
| except ImportError as e: |
| print("โ Failed to import controller.pix2text_controller:", e) |
|
|
| try: |
| print("Testing import of controller.table_controller...") |
| from controller.table_controller import table_bp |
| print("โ controller.table_controller imported successfully") |
| except ImportError as e: |
| print("โ Failed to import controller.table_controller:", e) |
|
|
| try: |
| print("Testing import of controller.scribble_controller...") |
| from controller.scribble_controller import scribble_bp |
| print("โ controller.scribble_controller imported successfully") |
| except ImportError as e: |
| print("โ Failed to import controller.scribble_controller:", e) |
|
|
| print("Import test completed.") |