Skip to content

Enrich displayed python error message occuring while serving app - #8478

Merged
philippjfr merged 2 commits into
holoviz:mainfrom
tmoulignier:main
Mar 12, 2026
Merged

Enrich displayed python error message occuring while serving app#8478
philippjfr merged 2 commits into
holoviz:mainfrom
tmoulignier:main

Conversation

@tmoulignier

Copy link
Copy Markdown
Contributor

Hello,

Between the versions 1.8.2 and 1.8.3, a behavior was changed in the error handler. If we serve a function that runs into a python error, the behavior goes from

1.8.2 : Error 505 appearing in the browser, full traceback in the console
to

1.8.3 : Simple error message in the browser, nothing in the console
The loss of traceback turns debugging into a nightmare.

The simple error message seem to come from this, whose code actually changed between the two versions:
https://github.com/holoviz/panel/blob/v1.8.3/panel/io/handlers.py#L369

I propose to replace the simple e put in the string by its traceback, and print it to have it in the console to benefit from IDE console features.

I propose a pull request with the associated changes.

Thanks,
Thibault

@holovizbot

Copy link
Copy Markdown

This pull request has been mentioned on HoloViz Discourse. There might be relevant details there:

https://discourse.holoviz.org/t/python-error-showing-in-browser/9114/4

Comment thread panel/io/handlers.py Outdated
@codecov

codecov Bot commented Mar 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.04%. Comparing base (a222327) to head (7cd044d).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
panel/io/handlers.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #8478       +/-   ##
===========================================
+ Coverage   70.44%   86.04%   +15.60%     
===========================================
  Files         348      349        +1     
  Lines       55047    55100       +53     
===========================================
+ Hits        38776    47411     +8635     
+ Misses      16271     7689     -8582     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@philippjfr philippjfr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @tmoulignier! Test failure unrelated, will merge.

@philippjfr
philippjfr merged commit 2c7dbc6 into holoviz:main Mar 12, 2026
15 of 18 checks passed
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants