Skip to content

Commit f17312d

Browse files
committed
fix log_buffer
1 parent 96616c1 commit f17312d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

openhands/runtime/client/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,8 @@ async def execute_action(action_request: ActionRequest):
633633
observation = await client.run_action(action)
634634
return event_to_dict(observation)
635635
except Exception as e:
636-
logger.error(f'Error processing command: {str(e)}')
636+
logger.error(f'Error processing command: {e}')
637+
logger.exception(e)
637638
raise HTTPException(status_code=500, detail=str(e))
638639

639640
@app.post('/upload_file')

openhands/runtime/client/runtime.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ async def ainit(self, env_vars: dict[str, str] | None = None):
179179
self.container = self.docker_client.containers.get(self.container_name)
180180
await self.start_docker_container()
181181

182+
self.log_buffer = LogBuffer(self.container)
183+
182184
@staticmethod
183185
def _init_docker_client() -> docker.DockerClient:
184186
try:
@@ -259,7 +261,6 @@ async def _init_container(
259261
environment={'DEBUG': 'true'} if self.config.debug else None,
260262
volumes=volumes,
261263
)
262-
self.log_buffer = LogBuffer(container)
263264
logger.info(f'Container started. Server url: {self.api_url}')
264265
return container
265266
except Exception as e:

0 commit comments

Comments
 (0)