Closed ElijahMeyer3 closed 3 months ago
Couple of quick clarifying statements:
https://github.com/ElijahMeyer3/Coursera/blob/main/bechdel.csv
[1mindexing[0m [34mbechdel.csv[0m [====================================] [32m109.28MB/s[0m, eta: [36m 0s[0m
Or is it that echo: false
didn't suppress the standard error output?
For the cell suppression, we only have limited support for disabling STDERR messages (red text) via messages: false
or warnings: false
. c.f. Code Cell Options. We don't currently implement an echo: false
option.
For the progress bar, I think that's related to {readr}
/{rlang}
showing a progress bar while not being exactly in an interactive mode. The gibberish that is generated is a side effect of not being able to reset a writing buffer. We need to handle this part upstream at webR
(set a non-interactive flag under our use of captureR
) and/or tweak detection in readr::show_progress()
/rlang::is_interactive()
.
The quickest way forward would be to set in a setup context:
```{webr-r}
#| context: setup
# Disable progress bar
options(readr.show_progress = FALSE)
Or, within the above code cell using:
````md
```{webr-r}
bechdel <- read_csv("bechdel.csv", progress = FALSE)
Thank you for the clarification questions.
The "gibberish" output is indeed the
[1mindexing�[0m �[34mbechdel.csv�[0m [====================================] �[32m109.28MB/s�[0m, eta: �[36m 0s�[0m
That is the data being referenced yes.
This issue isn't specific to this data set. I see this issue across any data set I try and read in this way.
Couple of quick clarifying statements:
- I think this is the data:
https://github.com/ElijahMeyer3/Coursera/blob/main/bechdel.csv
- Is the "gibberish" output the following:
[1mindexing�[0m �[34mbechdel.csv�[0m [====================================] �[32m109.28MB/s�[0m, eta: �[36m 0s�[0m
Or is it that
echo: false
didn't suppress the standard error output?For the cell suppression, we only have limited support for disabling STDERR messages (red text) via
messages: false
orwarnings: false
. c.f. Code Cell Options. We don't currently implement anecho: false
option.For the progress bar, I think that's related to
{readr}
/{rlang}
showing a progress bar while not being exactly in an interactive mode. The gibberish that is generated is a side effect of not being able to reset a writing buffer. We need to handle this part upstream atwebR
(set a non-interactive flag under our use ofcaptureR
) and/or tweak detection inreadr::show_progress()
/rlang::is_interactive()
.The quickest way forward would be to set in a setup context:
```{webr-r} #| context: setup # Disable progress bar options(readr.show_progress = FALSE)
Or, within the above code cell using:
bechdel <- read_csv("bechdel.csv", progress = FALSE)
This is perfect. Thank you!
I filed a ticket upstream in the main webR repo: https://github.com/r-wasm/webr/issues/426
Going forward, we'll likely set a flag that disables the session in quarto-webr
being registered as interactive by rlang::is_interactive()
. I can't promise any kind of resolution timeline due to multiple pieces being in play.
[heart] Elijah Meyer, Ph.D. reacted to your message:
From: James J Balamuta @.> Sent: Tuesday, May 21, 2024 7:28:28 PM To: coatless/quarto-webr @.> Cc: Elijah Meyer, Ph.D. @.>; Author @.> Subject: Re: [coatless/quarto-webr] [Bug]: Additional "gibberish" output when reading in data using webR (Issue #206)
I filed a ticket upstream in the main webR repo: r-wasm/webr#426https://urldefense.com/v3/__https://github.com/r-wasm/webr/issues/426__;!!OToaGQ!tKHvtqVyna0Lmk8go7rNwGRu6lRluuSUTIE8RQ9vc0BCBOM8AxYHZlHkbHSLAyeRUpBbDWgmxanlLwRyEdtrh9eL$
Going forward, we'll likely set a flag that disables the session in quarto-webr being registered as interactive by rlang::is_interactive(). I can't promise any kind of resolution timeline due to multiple pieces being in play.
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/coatless/quarto-webr/issues/206*issuecomment-2123301261__;Iw!!OToaGQ!tKHvtqVyna0Lmk8go7rNwGRu6lRluuSUTIE8RQ9vc0BCBOM8AxYHZlHkbHSLAyeRUpBbDWgmxanlLwRyEXx7xRwe$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AHT5VNZE325UWRR773WRGOLZDON5ZAVCNFSM6AAAAABIB5W356VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRTGMYDCMRWGE__;!!OToaGQ!tKHvtqVyna0Lmk8go7rNwGRu6lRluuSUTIE8RQ9vc0BCBOM8AxYHZlHkbHSLAyeRUpBbDWgmxanlLwRyEaju0ORA$. You are receiving this because you authored the thread.Message ID: @.***>
George modified Shelter.captureR()
in the latest webR build so that non-interactive status at the R level has now been set. This should mean that in webR v0.3.4 or v0.4.0 the need to disable progress via a setup cell is no longer required.
[celebrate] Elijah Meyer, Ph.D. reacted to your message:
From: James J Balamuta @.> Sent: Wednesday, June 19, 2024 8:12:11 PM To: coatless/quarto-webr @.> Cc: Elijah Meyer, Ph.D. @.>; Author @.> Subject: Re: [coatless/quarto-webr] [Bug]: tidyverse/readr progress bar shows "gibberish" before description (Issue #206)
George modified Shelter.captureR() in the latest webR build so that non-interactive status at the R level has now been set. This should mean that in webR v0.3.4 or v0.4.0 the need to disable progress via a setup cell is no longer required.
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/coatless/quarto-webr/issues/206*issuecomment-2179403025__;Iw!!OToaGQ!qEvccyY-KY2Ux9msYv_BJ-1jLR1h_QgnS07MB_WDiQB9ws-MxKvDdKpHJmnXQ3y5h914BjKG4ITau9OzYadowGt2$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AHT5VNYGK2LOPYFACWTP6K3ZIHQZXAVCNFSM6AAAAABIB5W356VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGQYDGMBSGU__;!!OToaGQ!qEvccyY-KY2Ux9msYv_BJ-1jLR1h_QgnS07MB_WDiQB9ws-MxKvDdKpHJmnXQ3y5h914BjKG4ITau9OzYYcXoAVV$. You are receiving this because you authored the thread.Message ID: @.***>
Bug description
When reading in data by clicking Run Code, "gibberish" output is given before expected output.
Steps to reproduce
The data are stored in a data folder in the same repo as the Bechdel + data visualization qmd.