Skip to content

Name the browser path in ChromeNotFoundError - #476

Open
Blizzeq wants to merge 2 commits into
plotly:mainfrom
Blizzeq:fix/report-missing-browser-path
Open

Blizzeq wants to merge 2 commits into
plotly:mainfrom
Blizzeq:fix/report-missing-browser-path

Conversation

@Blizzeq

@Blizzeq Blizzeq commented Sep 18, 2026

Copy link
Copy Markdown

Refs #422.

With a wrong BROWSER_PATH (or path=), Kaleido 1.4.0 raises ChromeNotFoundError rather than hanging, but the message only says to install Chrome, which does not help someone who set the path on purpose. The error now starts with the path that was tried, e.g. No browser found at BROWSER_PATH='/nonexistent/chrome'., followed by the existing install hint.

Two tests cover path= and BROWSER_PATH. The env var test hides the downloaded Chrome, since that one takes precedence over BROWSER_PATH. Full suite passes locally on macOS.

When the user points Kaleido at a browser with path= or BROWSER_PATH and nothing is there, the error only told them to install Chrome. Now it names the path that was tried.
@camdecoster camdecoster self-assigned this Sep 21, 2026

@camdecoster camdecoster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! This is helpful update. Could you please make a couple of changes?

Comment thread src/py/tests/test_kaleido.py Outdated

import pytest
from choreographer.browsers import chromium
from choreographer.errors import ChromeNotFoundError

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's import from the Kaleido errors for this:

Suggested change
from choreographer.errors import ChromeNotFoundError
from kaleido.errors import ChromeNotFoundError

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 090bda6.

Comment thread CHANGELOG.md Outdated
## Unreleased

### Fixed
- Name the browser path in `ChromeNotFoundError` when it was set with `path=` or `BROWSER_PATH` and points to nothing, instead of only suggesting to install Chrome [[issue #422](https://github.com/plotly/Kaleido/issues/422)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Name the browser path in `ChromeNotFoundError` when it was set with `path=` or `BROWSER_PATH` and points to nothing, instead of only suggesting to install Chrome [[issue #422](https://github.com/plotly/Kaleido/issues/422)]
- Add the browser path to message in `ChromeNotFoundError` when it was set with `path=` or `BROWSER_PATH` and points to nothing [[#476](https://github.com/plotly/Kaleido/pull/476)]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 090bda6.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants