Skip to content

Commit ad3b143

Browse files
zbucclaude
andcommitted
Fix import path in config.py to support both package and script execution
Use try/except to handle both import contexts: - Try relative import first (for package imports like in E2E tests) - Fall back to direct import (for scripts run from within blender_blocking/) This fixes the ModuleNotFoundError that was preventing E2E tests from running in CI/CD. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 19ef553 commit ad3b143

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

blender_blocking/config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
from dataclasses import dataclass, field
66
from typing import Dict, Optional, Tuple
77

8-
from utils.blender_version import get_eevee_engine_name
8+
try:
9+
# Try relative import first (for package imports)
10+
from .utils.blender_version import get_eevee_engine_name
11+
except ImportError:
12+
# Fall back to direct import (for direct script execution)
13+
from utils.blender_version import get_eevee_engine_name
914

1015

1116
_VALID_RECON_MODES = {"legacy", "loft_profile", "silhouette_intersection"}

0 commit comments

Comments
 (0)