ERROR: Source and destination can not be the same - followon from #2291

Open
#10,276 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, linux, r
Domain
cli

Research direction

Start with the publish stack trace in quarto.js, especially copyTo, stageDocumentPublish, and renderForPublish, then reproduce the issue using the cron command and _publish.yml described here. Compare interactive and non-interactive quarto-pub publishing; done means the documented Linux cron invocation publishes successfully without the same-source error.

Written by the indexing model from the issue text.

Description

bug file-systems needs-discussion
Bug description

ERROR: Source and destination cannot be the same.

I published interactively to quarto-pub once.
The file _publish.yml was created.

Now trying to set up auto-update with linux server and cron.
Running in cron on a linux server:

35 12 * * * /app/apps/rhel8/quarto/1.4.549/bin/quarto publish quarto-pub '/home/phiggins/data_space/shared_projects/sgm_multicenter/sgm_data.qmd' --no-prompt --no-browser >> '/home/phiggins/data_space/shared_projects/sgm_multicenter/siteupdate.log' 2>&1

Everything renders to HTML, then I get the above error in the log.

Full details from the log:

[1m[34mRendering for publish:
[39m[22m
[31m

processing file: sgm_data.qmd
[39m1/17
2/17 [setup]
3/17
4/17 [unnamed-chunk-1]
5/17
6/17 [unnamed-chunk-2]
7/17
8/17 [unnamed-chunk-3]
9/17
10/17 [unnamed-chunk-4]
11/17
12/17 [unnamed-chunk-5]
13/17
14/17 [unnamed-chunk-6]
15/17
16/17 [unnamed-chunk-7]
17/17
[31moutput file: sgm_data.knit.md

[39m[1mpandoc [22m
to: html
output-file: sgm_data.html
standalone: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png

[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: SGM Data for Pfizer Multicenter Project
editor: visual

[91mERROR: Source and destination cannot be the same.

Stack trace:
at copyTo (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:41328:15)
at stageDocumentPublish (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:102128:9)
at renderForPublish (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:102116:24)
at eventLoopTick (ext:core/01_core.js:183:11)
at async handlePublish (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:102015:26)
at async publishDocument (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:106587:38)
at async publish6 (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:106679:132)
at async doPublish (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:106639:13)
at async publishAction (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:106650:9)
at async Command.fn (file:///app/apps/rhel8/quarto/1.4.549/bin/quarto.js:106627:9)[39m

Steps to reproduce

Can not share quarto doc due to PHI in source.
But as seen in the log, it renders to HTML, and interactive quarto publish works fine.
But a problem when trying to update with cron on a linux server

Expected behavior

HTML should be published to update the website on quarto-pub

Actual behavior

get error seen in log above

[91mERROR: Source and destination cannot be the same.

Your environment

sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux 8.10 (Ootpa)

Matrix products: default
BLAS: /usr/lib64/libblas.so.3.8.0
LAPACK: /usr/lib64/liblapack.so.3.8.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: America/New_York
tzcode source: system (glibc)

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] flextable_0.9.6 REDCapTidieR_1.1.1 janitor_2.2.0 here_1.0.1
[5] lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
[9] purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1
[13] ggplot2_3.5.1 tidyverse_2.0.0

loaded via a namespace (and not attached):
[1] gtable_0.3.5 xfun_0.42 htmlwidgets_1.6.4
[4] tzdb_0.4.0 REDCapR_1.1.0 vctrs_0.6.5
[7] tools_4.3.2 generics_0.1.3 curl_5.2.0
[10] fansi_1.0.6 pkgconfig_2.0.3 data.table_1.15.0
[13] checkmate_2.3.1 uuid_1.2-0 lifecycle_1.0.4
[16] compiler_4.3.2 textshaping_0.3.7 munsell_0.5.1
[19] snakecase_0.11.1 httpuv_1.6.15 fontquiver_0.2.1
[22] fontLiberation_0.1.0 htmltools_0.5.7 later_1.3.2
[25] pillar_1.9.0 crayon_1.5.2 gfonts_0.2.0
[28] openssl_2.1.1 mime_0.12 fontBitstreamVera_0.1.1
[31] zip_2.3.1 tidyselect_1.2.1 digest_0.6.35
[34] formattable_0.2.1 stringi_1.8.4 rprojroot_2.0.4
[37] fastmap_1.1.1 grid_4.3.2 colorspace_2.1-0
[40] cli_3.6.2 magrittr_2.0.3 crul_1.4.2
[43] utf8_1.2.4 withr_3.0.0 promises_1.3.0
[46] gdtools_0.3.7 scales_1.3.0 backports_1.4.1
[49] timechange_0.3.0 officer_0.6.6 rmarkdown_2.25
[52] lobstr_1.1.2 ragg_1.2.7 askpass_1.2.0
[55] hms_1.1.3 shiny_1.8.1.1 evaluate_0.24.0
[58] knitr_1.45 rlang_1.1.4 Rcpp_1.0.12
[61] xtable_1.8-4 glue_1.7.0 httpcode_0.3.0
[64] xml2_1.3.6 rstudioapi_0.15.0 jsonlite_1.8.8
[67] R6_2.5.1 systemfonts_1.0.5

Quarto check output

quarto check

[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.450
Path: /usr/lib/rstudio-server/bin/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.6.8
Path: /usr/bin/python3
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
Version: 4.3.2
Path: /app/apps/rhel8/R/4.3.2/lib64/R
LibPaths:
- /home/phiggins/R/x86_64-pc-linux-gnu-library/4.3
- /app/apps/rhel8/R/4.3.2/lib64/R/library
knitr: 1.45
rmarkdown: 2.25

[✓] Checking Knitr engine render......OK

Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.