-
Notifications
You must be signed in to change notification settings - Fork 62
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
"Data rewind wasn't possible" #794
Comments
I believe this may be related to #762. Is this on Posit Connect? Or a different backend? If so, is there a chance the server you use in |
It's Posit Connect, but my organization has its own server -- if that makes sense. I use board_rsconnect() to connect. I thought of maybe disconnecting and reconnecting before saving the new data, to reset everything, but I didn't find a function to disconnect. |
Definitely makes sense that your org has its own Connect server! Could you ask the folks who maintain your server if:
We have observed both of those things to cause a "data rewind" curl error. If it's intermittent, that makes me think maybe it could be a proxy problem. |
i stumbled on the cause of my problem. i had accidentally included the directory in the name of the pin ("username/table_name" instead of just "table_name"). i'm guessing the special character was causing the issue, even though it would still save (unreliably). once i gave the table a proper name, everything worked well. it be worth adding adding a warning if the name includes forbidden characters. |
Hmmmm @erdnaxel are you saying that the problem crops up when you include your username, like library(pins)
b <- board_connect()
#> Connecting to Posit Connect 2023.07.0 at <https://colorado.posit.co/rsc>
b |> pin_write(
sample(1:100, 10),
"julia.silge/snazzy_numbers",
type = "json"
)
#> Writing to pin 'julia.silge/snazzy_numbers' Created on 2023-10-30 with reprex v2.0.2 We definitely expect that to work and in fact recommend including your username when storing pins to Connect. Or did you mean something else by "special character"? |
ah, the plot thickens! so the way that works for me is when i save using just the name of the table.
when i save like that, it automatically puts it in my directory (username) and everything works well. when i read the table, i have to put the directory so it knows where to look:
the issue arose when i included the username while saving (which i did because i'm used to including it when reading).
when i logged onto the web interface to look at my tables, i noticed that the name on the table on the server was by special character, i meant the forward slash. i thought that might be causing the issue, but based on what you said, that shouldn't create the issue. |
Yeah, the forward slash definitely should be fine and we generally recommend including the username. It is true that right now, when you write, it will write to different pins, which is not great. I'll open another issue on that. Were you able to look into any of these possibilities?
Intermittent problems can be super hard to find but we've definitely had reports of other "data rewind" errors. |
I had one more thought here. Folks have gotten into trouble with the Connect user and content caches that pins used to use. If you install from GitHub, you'll get a version which (although slightly slower in some circumstances) will have fewer surprising failures. You might try using the development version to see if that avoids your intermittent problem: pak::pak("rstudio/pins-r") |
Let us know if you have further questions! 🙌 |
Ah, sorry, I thought I had closed the loop on this, but I realize I hadn't. I got a new laptop for work, so I had to reinstall packages, including the latest version of pins, and all the problems went away. The updated version of pins recommends using the username in the name of the pin, which I've done, and everything works well now. |
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
I have a script in which I read a pin, make changes to the data and then write the new data to the same pin.
I sometimes get the message:
"Error in curl::curl_fetch_memory(url, handle = handle) : necessary data rewind wasn't possible"
If I run the same pin_write line again, it works.
(I don't know how to make this a reproducible example. I have many scripts that operate on the same idea and that don't get this error. Even in this script, the error sometimes occur and sometimes doesn't.)
The text was updated successfully, but these errors were encountered: