Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed results for estimates widget all show "ERROR: Rendered has not been set" #1880

Open
swernli opened this issue Aug 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@swernli
Copy link
Collaborator

swernli commented Aug 23, 2024

When using the widgets to display a resource estimation result, if the checkbox for "Show detailed rows" is selected, then each of the detailed explanations' text start with "ERROR: Rendered has not been set." Not sure where exactly that's coming from, but I wonder if it is a side of effect of trying to display LaTex in the paragraphs?

image
@swernli swernli added bug Something isn't working needs triage labels Aug 23, 2024
@idavis
Copy link
Collaborator

idavis commented Sep 3, 2024

There error is typo. The renderer has no been set. See npm/qsharp/ux/rederers.tsx. When working in notebooks we need to ensure the default renderer is replaced with a call to setRenderer.

// Default renderer to be replaced before components are first used.
// Expectation is that this will convert markdown and/or LaTeX to HTML.
let theRenderer = function (input: string): string {
  const err = "ERROR: Rendered has not been set";
  console.error(err);
  return err + ". " + input;
};

export function setRenderer(renderer: (input: string) => string) {
  theRenderer = renderer;
}

@billti billti self-assigned this Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants