Skip to content

Commit 6823135

Browse files
authored
Fix snake environment package import (#932)
1 parent 56ba813 commit 6823135

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

envs/snake_env/server/snake_environment.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@
2222

2323
# Support both in-repo and standalone imports
2424
try:
25-
# In-repo imports (when running from OpenEnv repository)
26-
from core.env_server.interfaces import Environment
27-
from core.env_server.types import State
25+
# Package import path used by installed envs and PYTHONPATH=src:envs.
26+
from openenv.core.env_server.interfaces import Environment
27+
from openenv.core.env_server.types import State
2828

2929
from ..models import SnakeAction, SnakeObservation
3030
except ImportError:
31+
# Direct execution from envs/snake_env.
3132
from models import SnakeAction, SnakeObservation
3233

3334
try:
34-
# Standalone imports with the current openenv package namespace
3535
from openenv.core.env_server.interfaces import Environment
3636
from openenv.core.env_server.types import State
3737
except ImportError:
38-
# Backward-compatible standalone imports with the legacy namespace
38+
# Backward-compatible standalone imports with the legacy namespace.
3939
from openenv_core.env_server.interfaces import Environment
4040
from openenv_core.env_server.types import State
4141

0 commit comments

Comments
 (0)