Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Exception stack traces missing when simulation Q# from python notebooks #699

Open
adrianleh opened this issue Jul 15, 2022 · 0 comments
Open
Labels
Area-Kernel Issue relates to the IQ# kernel. Kind-Enhancement New feature or request

Comments

@adrianleh
Copy link

Describe the bug

When a QSharp operation, declared inside a %%qsharp cell in a python jupyter notebook, is run through a simulator from python and throws an exception the error message does not contain a stack trace but rather just the exception with its message.

To Reproduce

Run a Q# operation (declared in a %%qsharp cell) that throws an exception from a python simulator in a jupyter notebook

Expected behavior

Print the exception message and error location or stack trace of such errors to allow users to debug where the error is.

Actual behavior

The exception is shown but without a stack trace or any indication of where the exception was thrown, except for the entry point of the simulation (SolvePuzzle in the example below).

The stack trace and error location can be found in the debug console, if IQSHARP_LOG_LEVEL is set to DEBUG
Example:
ff1e7191-a92e-4044-9a94-5cd83d7782d1

System information

  • OS:
    Win 10

  • .NET Core Version:
    6.0.302

  • IQ# Version:
    iqsharp: 0.24.210930
    Jupyter Core: 1.5.0.0

  • Python Version (if applicable):
    3.9.12

@bettinaheim bettinaheim transferred this issue from microsoft/qsharp-runtime Jul 28, 2022
@cgranade cgranade added Kind-Enhancement New feature or request Area-Kernel Issue relates to the IQ# kernel. and removed bug Status-NeedsTriage labels Sep 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-Kernel Issue relates to the IQ# kernel. Kind-Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants