-
Notifications
You must be signed in to change notification settings - Fork 61
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
Error: Cannot find progress bar (req_perform_parallel) #594
Comments
Hmmm |
I also have no idea. And here is some more weirdness. I just noticed that it does not happen every time! If I hit Esc too fast, it does not seem to reuse the id??? Screencast_20241211_183723.webm |
@gaborcsardi any idea what's going on here? The progress bar is created in a helper function: Lines 242 to 284 in e972770
Maybe something is going wrong with how I set |
I am not sure, but my guess is that the progress bar's env is already removed, but the curl multi-handle is still alive and you get a final |
Ooooh I bet that's it. |
I think we can fix this by using a separate pool for each |
I think you can also |
I can't reliably reproduce this. I tried what I thought would illustrate it more reliably: library(httr2)
options(cli.progress_show_after = 0)
reqs <- list(
request(example_url()) |> req_url_path("/delay/10"),
request(example_url()) |> req_url_path("/delay/1"),
request(example_url()) |> req_url_path("/delay/10"),
request(example_url()) |> req_url_path("/delay/1"),
request(example_url()) |> req_url_path("/delay/10"),
request(example_url()) |> req_url_path("/delay/1")
)
resps <- req_perform_parallel(reqs, progress = TRUE) But I only manage to see the error once, so I suspect it might be more of a problem on windows. |
I'm on Arch Linux (BTW) It only seems to happen when I interrupt the process after a couple of seconds and not every time. Which makes this the weirdest behaviour that I've experienced so far in R. Can you start another process after you see the error once? I need to restart R. |
But my experiments suggest that there might be a bigger problem — I think terminating ... Hmmmm, some experiments suggest that maybe that's not the case? |
When `req_perform_parallel()` is terminated, it seems like it's possible for a curl progress call to complete after the progress bar has been terminated. Fixes #594
This fixes the error 😊. But I observed some other unexpected behaviour.
Sorry for the screen recording, but I don't know how else to show it. Until second 46, you see the first issue. I wait a little bit and then show issue 2 from secon 56. httr2-pr-behaviour.webmI think this is all far less problematic than having to restart R to be able to run |
@JBGruber I did a bunch of experiments and convinced myself that they're getting cancelled on my machine, but maybe that code path doesn't work correctly on linux? I'll think about how to test that hypothesis. |
When I run a
req_perform_parallel
with a progress bar and abort the operation, every new call toreq_perform_parallel
will error until the R session is restarted. Here is a minimal example:This does not apply to
req_perform_sequential
.The text was updated successfully, but these errors were encountered: