Skip to content

Commit

Permalink
feat: merge identical url from different error messages (All-Hands-AI…
Browse files Browse the repository at this point in the history
  • Loading branch information
Shimada666 committed May 4, 2024
1 parent 718730a commit 30de484
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions opendevin/const/guide_url.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TROUBLESHOOTING_URL = 'https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting'
3 changes: 2 additions & 1 deletion opendevin/runtime/docker/exec_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

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
Expand Down Expand Up @@ -56,7 +57,7 @@ def __init__(
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
Expand Down
3 changes: 2 additions & 1 deletion opendevin/runtime/docker/ssh_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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
Expand Down Expand Up @@ -72,7 +73,7 @@ def __init__(
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
Expand Down
3 changes: 2 additions & 1 deletion opendevin/server/agent/agent.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -166,7 +167,7 @@ async def create_controller(self, start_event: dict):
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()
Expand Down

0 comments on commit 30de484

Please sign in to comment.