Skip to content

Conversation

@tconkling
Copy link
Contributor

@tconkling tconkling commented Feb 10, 2021

Adds a new config option, "client.showTracebacks". By default, it's True.

If the option is set to False, then uncaught exceptions in a Streamlit app will result in a generic "Something went wrong!" warning in the browser, rather than the exception and its traceback:

image

This logic happens in the error_util.handle_uncaught_app_exception function, rather than directly within ScriptRunner.

scriptrunner_test, caching_test, and streamlit_test have new tests that verify the right thing happens when exceptions are thrown in different circumstances with this config option turned on and off.

@asaini - the "whoops something blew up" text (see above) needs a product review.

Closes #1032

@tconkling tconkling requested a review from a team February 10, 2021 02:00
if config.get_option("client.showTracebacks"):
LOGGER.debug(e)
st.exception(e)
# TODO: Clean up the stack trace, so it doesn't include ScriptRunner.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(This TODO existed already - this whole branch was just moved from ScriptRunner)

Copy link
Collaborator

@kmcgrady kmcgrady left a comment

Choose a reason for hiding this comment

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

Looks good to me. @asaini ready for you!

@asaini
Copy link

asaini commented Feb 12, 2021

@tconkling @kmcgrady : Is the text of the generic error message configurable by the developer?

@tconkling
Copy link
Contributor Author

@asaini - nope, it's hardcoded. (I'd push back gently against having it be configurable... that seems like a pretty fine-grained degree of user-customization that we don't afford to other parts of the Streamlit UI.)

@tconkling tconkling merged commit 817a22a into streamlit:develop Feb 16, 2021
@tconkling tconkling deleted the tim/HideTracebacks branch February 16, 2021 19:53
tconkling added a commit to tconkling/streamlit that referenced this pull request Feb 16, 2021
* develop:
  config: client.showTracebacks (streamlit#2770)
  Create base color picker for use with API and internally (streamlit#2778)
  Slider thumb values are always visible (streamlit#2724)
  Update component-template submodule to latest (streamlit#2767)
  `allow_multiple_files` -> `accept_multiple_files` (streamlit#2761)
tconkling added a commit to tconkling/streamlit that referenced this pull request Feb 17, 2021
* develop:
  config: client.showTracebacks (streamlit#2770)
  Create base color picker for use with API and internally (streamlit#2778)
CFrez pushed a commit to CFrez/streamlit that referenced this pull request Feb 18, 2021
Adds a new config option, `"client.showTracebacks"`. By default, it's `True`.

If the option is set to `False`, then uncaught exceptions in a Streamlit app will result in a generic "Something went wrong!" warning in the browser, rather than the exception and its traceback

This logic happens in the `error_util.handle_uncaught_app_exception` function, rather than directly within ScriptRunner.

`scriptrunner_test`, `caching_test`, and `streamlit_test` have new tests that verify the right thing happens when exceptions are thrown in different circumstances with this config option turned on and off.

Closes streamlit#1032
@asaini
Copy link

asaini commented Feb 19, 2021

Update from product review before v0.77 release:

@asaini
Copy link

asaini commented Feb 19, 2021

Another request from thiago: Can we replace the - with an —? i.e. —

schaumb pushed a commit to FloWide/streamlit that referenced this pull request Feb 22, 2021
Adds a new config option, `"client.showTracebacks"`. By default, it's `True`.

If the option is set to `False`, then uncaught exceptions in a Streamlit app will result in a generic "Something went wrong!" warning in the browser, rather than the exception and its traceback

This logic happens in the `error_util.handle_uncaught_app_exception` function, rather than directly within ScriptRunner.

`scriptrunner_test`, `caching_test`, and `streamlit_test` have new tests that verify the right thing happens when exceptions are thrown in different circumstances with this config option turned on and off.

Closes streamlit#1032
tconkling added a commit that referenced this pull request Feb 22, 2021
A simple rename: `client.showTracebacks` config option is now `client.showErrorDetails`. (This was requested here: #2770 (comment))

We haven't pushed a release that uses the "showTracebacks" name, so we can get away without a warning about a deprecated config option.
kmcgrady pushed a commit that referenced this pull request Feb 24, 2021
* created conditional rendering of controls & tests

* reorganized and added tests

* removed accidently added unneeded import

* alter flex, padding and gap to align columns

* adjusted spacing since not duplicated

* alter flex, padding and gap to align columns

* adjusted spacing since not duplicated

* Fix checkbox spacing (#2738)

* remove extra padding

* remove snapshot completely

* add snapshot back in

* remove snapshots

* remove rest of snapshots

* add snapshots back in

* Autofocus "clear cache" button (#2739)

* autofocus clear cache button

* add test

* update test

* fix lint

* `allow_multiple_files` -> `accept_multiple_files` (#2761)

* Update component-template submodule to latest (#2767)

Point our `component-template` submodule to the latest commit in that repo.

(Among other things, this will de-dupe a bunch of the `component-lib` code that used to live in `component-template` before being pulled into its own npm package.)

* Slider thumb values are always visible (#2724)

* Close #2699

* Override Thumb subcomponent completely

* Fixed linting errors

Co-authored-by: Ken McGrady <[email protected]>

* Create base color picker for use with API and internally (#2778)

* Copy to shared and cleanup

* Cleanup

* remove comment

* config: client.showTracebacks (#2770)

Adds a new config option, `"client.showTracebacks"`. By default, it's `True`.

If the option is set to `False`, then uncaught exceptions in a Streamlit app will result in a generic "Something went wrong!" warning in the browser, rather than the exception and its traceback

This logic happens in the `error_util.handle_uncaught_app_exception` function, rather than directly within ScriptRunner.

`scriptrunner_test`, `caching_test`, and `streamlit_test` have new tests that verify the right thing happens when exceptions are thrown in different circumstances with this config option turned on and off.

Closes #1032

* Shared selectbox (#2795)

* Remove nonexistent elements from widget state (#2760)

* remove nonexistent elements from widget states

* fix typo

* add test

* Fix datetime timezone handling in data frames (#2784)

* save changes

* remove redundant change

* fix tests

* fix quotes

* add tests and other fixes

* fix lint

* update protobufs and tests

* add e2e test

* fix quotes

* update test

* Revert "removed accidently added unneeded import"

This reverts commit f886adc.

* Revert "reorganized and added tests"

This reverts commit d3632d9.

* Revert "created conditional rendering of controls & tests"

This reverts commit 7c4400e.

* updated tests

* fixed lint

* correct percentages in spec for test

* update st_image column image

* added comment to HoizontalBlock

* added Issue/PR to comment

Co-authored-by: bh-streamlit <[email protected]>
Co-authored-by: Simon Biggs <[email protected]>
Co-authored-by: Tim Conkling <[email protected]>
Co-authored-by: Henrikh Kantuni <[email protected]>
Co-authored-by: Ken McGrady <[email protected]>
Co-authored-by: karrie <[email protected]>
ghost pushed a commit that referenced this pull request Feb 25, 2021
* Up version to 0.77.0

* client.showTracebacks -> showErrorDetails (per product) (#2837)

A simple rename: `client.showTracebacks` config option is now `client.showErrorDetails`. (This was requested here: #2770 (comment))

We haven't pushed a release that uses the "showTracebacks" name, so we can get away without a warning about a deprecated config option.

* Update "showErrorDetails" config description and docs (#2841)

New config description, and an updated docs page.

* fix typo in changelog

Co-authored-by: Tim Conkling <[email protected]>
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.

Allow hiding tracebacks

3 participants