Skip to content

Commit

Permalink
Python: Fixes displaying of error message to properly show the except…
Browse files Browse the repository at this point in the history
…ion details (#9507)

### Motivation and Context

This change is required to properly print exception details when logging
an error message, which helps debugging.

### Description

Fixes printing of debugging information used
[here](https://github.com/microsoft/semantic-kernel/blob/db45cfa7cf1b0f00aa3b1414e4d018ba816b8960/python/semantic_kernel/processes/local_runtime/local_process.py#L189)
where the exception details were ignored due to the usage of bad syntax.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
  • Loading branch information
victorgarciaaprea and moonbox3 authored Nov 4, 2024
1 parent d5906b6 commit 3a59ec9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ async def internal_execute(self, max_supersteps: int = 100, keep_alive: bool = T
await asyncio.gather(*message_tasks)

except Exception as ex:
print("An error occurred while running the process: %s.", ex)
print("An error occurred while running the process: %s." % ex)
raise

async def to_kernel_process(self) -> "KernelProcess":
Expand Down

0 comments on commit 3a59ec9

Please sign in to comment.