mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Fix duplicate class registration by using consistent import paths
The SQLSharedConversationInfoServiceInjector class was being registered twice because the same module was being imported via two different paths: - enterprise.server.sharing.sql_shared_conversation_info_service - server.sharing.sql_shared_conversation_info_service This happened because the enterprise pyproject.toml defines packages without the 'enterprise.' prefix (e.g., 'server' not 'enterprise.server'), and the PYTHONPATH includes both '.' and the poetry virtualenv. Fixed by changing all imports to use the canonical 'server.sharing.xxx' path that matches the package configuration. Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
parent
573be9c5e0
commit
a63001e106
@ -23,7 +23,7 @@ from server.sharing.shared_event_service import (
|
||||
SharedEventServiceInjector,
|
||||
)
|
||||
|
||||
from enterprise.server.sharing.sql_shared_conversation_info_service import (
|
||||
from server.sharing.sql_shared_conversation_info_service import (
|
||||
SQLSharedConversationInfoService,
|
||||
)
|
||||
from openhands.agent_server.models import EventPage, EventSortOrder
|
||||
|
||||
@ -13,8 +13,7 @@ from server.sharing.shared_conversation_models import (
|
||||
SharedConversationPage,
|
||||
SharedConversationSortOrder,
|
||||
)
|
||||
|
||||
from enterprise.server.sharing.sql_shared_conversation_info_service import (
|
||||
from server.sharing.sql_shared_conversation_info_service import (
|
||||
SQLSharedConversationInfoServiceInjector,
|
||||
)
|
||||
|
||||
|
||||
@ -5,11 +5,10 @@ from typing import Annotated
|
||||
from uuid import UUID
|
||||
|
||||
from fastapi import APIRouter, Depends, Query
|
||||
from server.sharing.shared_event_service import SharedEventService
|
||||
|
||||
from enterprise.server.sharing.filesystem_shared_event_service import (
|
||||
from server.sharing.filesystem_shared_event_service import (
|
||||
SharedEventServiceImplInjector,
|
||||
)
|
||||
from server.sharing.shared_event_service import SharedEventService
|
||||
from openhands.agent_server.models import EventPage, EventSortOrder
|
||||
from openhands.app_server.event_callback.event_callback_models import EventKind
|
||||
from openhands.sdk import Event
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user