ropensci / piggyback

:package: for using large(r) data files on GitHub
https://docs.ropensci.org/piggyback
GNU General Public License v3.0
182 stars 26 forks source link

Unexpected recurring error message #75

Closed Robinlovelace closed 2 years ago

Robinlovelace commented 2 years ago

First up, many thanks for this amazing package, saved me and colleagues many hours of moving data through clunkier systems.

Don't have a long example here but there definitely seems to be an issue:

I've seen this error message many times now:

piggyback::pb_upload(file = zipname, repo = "itsleeds/pct")
ℹ Uploading 'test-outputs-longford-2022-05-17.zip' ...
Error in parse_url(url) : length(url) == 1 is not TRUE

And have no idea what's going on, if its reproducible, or how to debug it. Can provide more info if needs be for now just posting here in case of use/interest.

tanho63 commented 2 years ago

This looks similar to the problem I caused/solved in #67 - is the devel version able to fix this for you?

Robinlovelace commented 2 years ago

This looks similar to the problem I caused/solved in #67 - is the devel version able to fix this for you?

Seems not, I've been using the version installed with remotes...

tanho63 commented 2 years ago

happy to try and solve this, what package version number do you have? does specifying which release you want to upload to help?

Robinlovelace commented 2 years ago

Update here: seems to be intermittent. I'm using the latest version of the piggyback pkg. Sorry for lack of reprex, can try to create one...

cboettig commented 2 years ago

closing for lack of activity, re-open as needed.

Robinlovelace commented 2 years ago

Thanks Carl and reasonable. Truth is, I'm still seeing this issue and have taken to using this:

gh_release_upload = function(file, tag = "0.0.1") {
  msg = glue::glue("gh release upload {tag} {file} --clobber")
  message("Running this command:\n", msg)
  system(msg)
}

However I'm not sure what's causing it so there's no specific action and if nobody else is seeing the issue then happy for it to be closed.

noamross commented 2 years ago

I am having this same issue, will attempt a reprex, @Robinlovelace did you get anywhere in identifying the source of the issue?

noamross commented 2 years ago

It appears to occur at https://github.com/ropensci/piggyback/blob/master/R/pb_upload.R#L166, when one does not specify a tag for upload. Piggyback uses "latest" by default, but there may not be a release named "latest", so when looking up the URL for upload, no url is found and a zero-length url variable is passed to httr::RETRY. So I think some logic is needed to use "latest" to construct upload_url if that's the value, rather than trying to look up the tag.

PMassicotte commented 1 year ago

Hi everyone. I am also facing this issue.

r$> pb_upload(tmp, overwrite = TRUE, tag = "v1.0.9")
! Release "v1.0.9" not found in "PMassicotte/learn-piggyback".
Would you like to create a new release now? 

1: Yes
2: No

Selection: 1
ℹ Uploading test.zip ...
Error in parse_url(url) : length(url) == 1 is not TRUE
In addition: Warning message:
! Failed to create release: HTTP error 422.
See returned error messages for more details 

The tag exists: https://github.com/PMassicotte/learn-piggyback/releases/tag/v1.0.9

Cheers, Phil

Robinlovelace commented 1 year ago

Yes this is still an issue so heads-up @cboettig. @temospena and others have hit this also. Please re-open if poss to at least make this more visible to others working with the package.

tanho63 commented 1 year ago

@PMassicotte Can you open a new issue and add sessioninfo::session_info() output after running the reprex also?

PMassicotte commented 1 year ago

Sure!