mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
feat: merge identical url from different error messages (#1572)
This commit is contained in:
parent
718730a2b9
commit
30de484d49
1
opendevin/const/guide_url.py
Normal file
1
opendevin/const/guide_url.py
Normal file
@ -0,0 +1 @@
|
||||
TROUBLESHOOTING_URL = 'https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting'
|
||||
@ -11,6 +11,7 @@ from typing import Dict, List, Tuple
|
||||
|
||||
import docker
|
||||
|
||||
from opendevin.const.guide_url import TROUBLESHOOTING_URL
|
||||
from opendevin.core import config
|
||||
from opendevin.core.exceptions import SandboxInvalidBackgroundCommandError
|
||||
from opendevin.core.logger import opendevin_logger as logger
|
||||
@ -56,7 +57,7 @@ class DockerExecBox(Sandbox):
|
||||
self.docker_client = docker.from_env()
|
||||
except Exception as ex:
|
||||
logger.exception(
|
||||
'Error creating controller. Please check Docker is running and visit `https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting` for more debugging information.',
|
||||
f'Error creating controller. Please check Docker is running and visit `{TROUBLESHOOTING_URL}` for more debugging information.',
|
||||
exc_info=False,
|
||||
)
|
||||
raise ex
|
||||
|
||||
@ -11,6 +11,7 @@ from typing import Dict, List, Tuple, Union
|
||||
import docker
|
||||
from pexpect import pxssh
|
||||
|
||||
from opendevin.const.guide_url import TROUBLESHOOTING_URL
|
||||
from opendevin.core import config
|
||||
from opendevin.core.exceptions import SandboxInvalidBackgroundCommandError
|
||||
from opendevin.core.logger import opendevin_logger as logger
|
||||
@ -72,7 +73,7 @@ class DockerSSHBox(Sandbox):
|
||||
self.docker_client = docker.from_env()
|
||||
except Exception as ex:
|
||||
logger.exception(
|
||||
'Error creating controller. Please check Docker is running and visit `https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting` for more debugging information.',
|
||||
f'Error creating controller. Please check Docker is running and visit `{TROUBLESHOOTING_URL}` for more debugging information.',
|
||||
exc_info=False,
|
||||
)
|
||||
raise ex
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
from opendevin.const.guide_url import TROUBLESHOOTING_URL
|
||||
from opendevin.controller import AgentController
|
||||
from opendevin.controller.agent import Agent
|
||||
from opendevin.core import config
|
||||
@ -166,7 +167,7 @@ class AgentUnit:
|
||||
except Exception as e:
|
||||
logger.exception(f'Error creating controller: {e}')
|
||||
await self.send_error(
|
||||
'Error creating controller. Please check Docker is running and visit `https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting` for more debugging information..'
|
||||
f'Error creating controller. Please check Docker is running and visit `{TROUBLESHOOTING_URL}` for more debugging information..'
|
||||
)
|
||||
return
|
||||
await self.init_done()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user