-
Notifications
You must be signed in to change notification settings - Fork 334
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
Is there a known problem with downloading files in examples? #2774
Comments
AKAIK there's nothing intrinsic to pkgodwn that should prevent this, but as you surmised CRAN will not allow it.
And yes I suggest that you make a minimal package that recapitulates the problem. There are some instructrions for that here. |
Thanks, you're right on the mistake about supplying a parameter to
Reading man/linesInRemoteFile.Rd
trying URL 'https://raw.githubusercontent.com/dankelley/dod/main/NEWS.md'
Content type 'text/plain; charset=utf-8' length 1613 bytes
==================================================
downloaded 1613 bytes
Warning message:
In gzfile(file, mode) :
cannot open compressed file '/var/folders/8b/l4h64m1j22v5pb7vj049ff140000gn/T//RtmptPkNky/downlit/base', probable reason 'No such file or directory'
Error:
! in callr subprocess.
Caused by error in `build_reference()`:
! Failed to parse Rd in linesInRemoteFile.Rd
Caused by error in `gzfile()`:
! cannot open the connection
ℹ See `$stdout` and `$stderr` for standard output and error.
Type .Last.error to see the more details. |
I can't see your test repo: https://github.com/dankelley/downloadtest Is it in private status? |
Oh, I'm so sorry about that. I didn't make it in my usual way. It's public now. My apologies for being such a bother. |
FYI, my session info is as follows.
|
Summary: I wonder how to debug a problem with build_site() and downloading to a
tempdir()
.I'm working on a package that downloads oceanographic data. As I understand it, that's a problem for a package that might have hopes of getting on CRAN.
Some of the functions have a parameter that I call
destdir
, which is where to save the downloaded files. In my work, that will be~/data/
, for example. But, in my example code, I usetempdir()
to get a temporary directory in which to save the files.This scheme works in practice. And it works within examples, when I run those examples locally, or when I run the "check" action in RStudio.
However, when I try building the package docs with
pkgdown::build_site()
, I get that a download occurs, but then thatgzfile
cannot find the file. An example is below.This is odd, because I'm calling it with
where I'm stating that the text
"amsr"
ought to be part of the directory name.I don't really know how to debug this sort of problem. My code (https://github.com/dankelley/dod/) is quite long. Should I try to boil it down and post that, or is there a known problem that can occur with downloads to temporary directories?
The text was updated successfully, but these errors were encountered: