You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
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:
Describe the bug
When a QSharp operation, declared inside a
%%qsharpcell 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
%%qsharpcell) that throws an exception from a python simulator in a jupyter notebookExpected 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 (
SolvePuzzlein the example below).The stack trace and error location can be found in the debug console, if

IQSHARP_LOG_LEVELis set toDEBUGExample:
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