-
Notifications
You must be signed in to change notification settings - Fork 25
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: Invalid cross-device link (os error 18), rename ... -> ...pdf #35
Comments
Some additional information: The docker-container is based on docker run -it --rm \
-v //d/workspace/results_output:/opt/output \
render_report_container:latest \
Rscript render_report.R A volume is mounted for collecting the resulting PDF-report. The base_dir <- "/opt/output"
quarto::quarto_render(
input = "report.qmd",
output_format = "pdf",
output_file = file.path(base_dir, "report.pdf")
) Executing this script results in the error described above. However, after experimenting a bit, I discovered that changing the R-script as follows indeed produces the desired result and the PDF document successfully appears in the mounted volume. base_dir <- "/opt/output"
quarto::quarto_render(
input = "report.qmd",
output_format = "pdf",
output_file = "report.pdf"
)
file.copy(
from = "report.pdf",
to = base_dir
) Thus, leaving the copying of the file to R works perfectly opposed to having the file copied by |
Sorry for the delay here. This is the issue thread of the R Package quarto, and we are not thoroughly following as we do for the main project at quarto-dev/quarto-cli This error usually comes with a step of moving a file by renaming it cross mount. In some OS this is not possible and the file should be copied and renamed and not moved. This is why your experiment by copying the file afterwards works. Probably using Do you know if this is still an issue with last version of Quarto ? I would say this is related also to quarto-dev/quarto-cli#2671 which is about output directory but same for output file. I'll comment there |
I have commented in the other issue so I am closing this one here. Thank you for the report! |
When running
quarto::quarto_render
inside a docker container to render a PDF-document I get the following error:It seems as if something is wrong when trying to place the final pdf report in the output folder. Any ideas to solve the issue would be highly appreciated! Thanks in advance.
Edit:
I do not fully understand the syntax, however, could it be that this part in quarto's source code somehow related because of renaming the file instead of moving it (as the call to
Deno.renameSync
suggests)? (and: although affecting python , could this be related as well: core-api/python-client#176 ?)The text was updated successfully, but these errors were encountered: