Skip to content
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

path errors on win + RStudio #2

Open
CorradoLanera opened this issue Oct 7, 2017 · 2 comments
Open

path errors on win + RStudio #2

CorradoLanera opened this issue Oct 7, 2017 · 2 comments

Comments

@CorradoLanera
Copy link

CorradoLanera commented Oct 7, 2017

slides path creation has a missing slash after localhost. Moreover, if webshot:::is_windows(),
webshot calls webshot:::fix_windows_url() which appends his version of "file:///"..., hence if ari_narrate() attaches "files://localhost/" before that call, it crates a redundancy which leads to an error.

ari::ari_narrate(
  script = system.file("test", "ari_intro_script.md", package = "ari"),
  slides = system.file("test", "ari_intro.html", package = "ari"),
  voice  = "Joey"
)
#> "C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS ari_intro_script.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc495415dc44b5.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "C:\Users\corra\Documents\R\win-library\3.4\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\corra\AppData\Local\Temp\RtmpaU6xA7\rmarkdown-str495471b03a64.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
#> 
#> Output created: C:\Users\corra\AppData\Local\Temp\RtmpOCgHzv/ari_script_FYRyVqGWrzBH.html
#> Warning in normalizePath(path.expand(path), winslash, mustWork):
#> path[1]="file://localhostC:\Users\corra\Documents\R\win-library\3.4\ari
#> \test\ari_intro.html#1": The filename, directory name, or volume label
#> syntax is incorrect
#> Warning in normalizePath(path.expand(path), winslash, mustWork):
#> path[1]="file://localhostC:\Users\corra\Documents\R\win-library\3.4\ari
#> \test\ari_intro.html#2": The filename, directory name, or volume label
#> syntax is incorrect
#> Warning in normalizePath(path.expand(path), winslash, mustWork):
#> path[1]="file://localhostC:\Users\corra\Documents\R\win-library\3.4\ari
#> \test\ari_intro.html#3": The filename, directory name, or volume label
#> syntax is incorrect
#> Warning in normalizePath(path.expand(path), winslash, mustWork):
#> path[1]="file://localhostC:\Users\corra\Documents\R\win-library\3.4\ari
#> \test\ari_intro.html#4": The filename, directory name, or volume label
#> syntax is incorrect
#> Warning in normalizePath(path.expand(path), winslash, mustWork):
#> path[1]="file://localhostC:\Users\corra\Documents\R\win-library\3.4\ari
#> \test\ari_intro.html#5": The filename, directory name, or volume label
#> syntax is incorrect
#> Warning: running command '"C:\Users\corra\AppData\Roaming/PhantomJS/
#> phantomjs.exe" "C:/Users/corra/Documents/R/win-library/3.4/webshot/
#> webshot.js" "[{\"url\":\"file:///C:/Users/corra/AppData/Local/Temp/
#> RtmpOCgHzv/file:/localhostC:/Users/corra/Documents/R/win-library/3.4/
#> ari/test/ari_intro.html#1\",\"file\":\"C:\\Users\\corra\\AppData\\Local\
#> \Temp\\RtmpOCgHzv/ari_img_1_xwpH7ZergYFH.jpeg\",\"vwidth\":992,\"vheight
#> \":744,\"delay\":0.2,\"zoom\":1},{\"url\":\"file:///C:/Users/corra/
#> AppData/Local/Temp/RtmpOCgHzv/file:/localhostC:/Users/corra/Documents/R/
#> win-library/3.4/ari/test/ari_intro.html#2\",\"file\":\"C:\\Users\\corra\
#> \AppData\\Local\\Temp\\RtmpOCgHzv/ari_img_2_xwpH7ZergYFH.jpeg\",\"vwidth
#> \":992,\"vheight\":744,\"delay\":0.2,\"zoom\":1},{\"url\":\"file:///C:/
#> Users/corra/AppData/Local/Temp/RtmpOCgHzv/file:/localhostC:/Users/corra/
#> Documents/R/win-library/3.4/ari/test/ari_intro.html#3\",\"file\":\"C:\
#> \Users\\corra\\AppData\\Local\\Temp\\RtmpOCgHzv/ari_img_3_xwpH7ZergYFH.jpeg
#> \",\"vwidth\":992,\"vheight\":744,\"delay\":0.2,\"zoom\":1},{\"url\":
#> \"file:///C:/Users/corra/AppData/Local/Temp/RtmpOCgHzv/file:/localhostC:/
#> Users/corra/Documents/R/win-library/3.4/ari/test/ari_intro.html#4\",
#> \"file\":\"C:\\Users\\corra\\AppData\\Local\\Temp\\RtmpOCgHzv/
#> ari_img_4_xwpH7ZergYFH.jpeg\",\"vwidth\":992,\"vheight\":744,\"delay\":
#> 0.2,\"zoom\":1},{\"url\":\"file:///C:/Users/corra/AppData/Local/Temp/
#> RtmpOCgHzv/file:/localhostC:/Users/corra/Documents/R/win-library/3.4/ari/
#> test/ari_intro.html#5\",\"file\":\"C:\\Users\\corra\\AppData\\Local\\Temp
#> \\RtmpOCgHzv/ari_img_5_xwpH7ZergYFH.jpeg\",\"vwidth\":992,\"vheight\":
#> 744,\"delay\":0.2,\"zoom\":1}]"' had status 1
#> Error in webshot(url = paste0(slides, "#", slide_nums), file = img_paths, : webshot.js returned failure value: 1
Session info
devtools::session_info()
#> Session info -------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.4.2 (2017-09-28)
#>  system   x86_64, mingw32             
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  English_United States.1252  
#>  tz       Europe/Berlin               
#>  date     2017-10-08
#> Packages -----------------------------------------------------------------
#>  package       * version  date       source        
#>  ari             0.1.0    2017-08-31 CRAN (R 3.4.2)
#>  assertthat      0.2.0    2017-04-11 CRAN (R 3.4.1)
#>  aws.polly       0.1.2    2016-12-08 CRAN (R 3.4.1)
#>  aws.signature   0.3.5    2017-07-01 CRAN (R 3.4.1)
#>  backports       1.1.0    2017-05-22 CRAN (R 3.4.0)
#>  base          * 3.4.2    2017-09-28 local         
#>  base64enc       0.1-3    2015-07-28 CRAN (R 3.4.0)
#>  compiler        3.4.2    2017-09-28 local         
#>  curl            2.8.1    2017-07-21 CRAN (R 3.4.1)
#>  datasets      * 3.4.2    2017-09-28 local         
#>  devtools        1.13.3   2017-08-02 CRAN (R 3.4.1)
#>  digest          0.6.12   2017-01-27 CRAN (R 3.4.1)
#>  evaluate        0.10.1   2017-06-24 CRAN (R 3.4.1)
#>  graphics      * 3.4.2    2017-09-28 local         
#>  grDevices     * 3.4.2    2017-09-28 local         
#>  htmltools       0.3.6    2017-04-28 CRAN (R 3.4.1)
#>  httr            1.3.1    2017-08-20 CRAN (R 3.4.1)
#>  jsonlite        1.5      2017-06-01 CRAN (R 3.4.1)
#>  knitr           1.17     2017-08-10 CRAN (R 3.4.1)
#>  magrittr        1.5      2014-11-22 CRAN (R 3.4.1)
#>  MASS            7.3-47   2017-04-21 CRAN (R 3.4.1)
#>  memoise         1.1.0    2017-04-21 CRAN (R 3.4.1)
#>  methods       * 3.4.2    2017-09-28 local         
#>  prettyunits     1.0.2    2015-07-13 CRAN (R 3.4.1)
#>  progress        1.1.2    2016-12-14 CRAN (R 3.4.1)
#>  purrr           0.2.3    2017-08-02 CRAN (R 3.4.1)
#>  R6              2.2.2    2017-06-17 CRAN (R 3.4.1)
#>  Rcpp            0.12.12  2017-07-15 CRAN (R 3.4.1)
#>  rlang           0.1.2    2017-08-09 CRAN (R 3.4.1)
#>  rmarkdown       1.6      2017-06-15 CRAN (R 3.4.1)
#>  rprojroot       1.2      2017-01-16 CRAN (R 3.4.1)
#>  rvest           0.3.2    2016-06-17 CRAN (R 3.4.1)
#>  selectr         0.3-1    2016-12-19 CRAN (R 3.4.1)
#>  signal          0.7-6    2015-07-30 CRAN (R 3.4.1)
#>  stats         * 3.4.2    2017-09-28 local         
#>  stringi         1.1.5    2017-04-07 CRAN (R 3.4.0)
#>  stringr         1.2.0    2017-02-18 CRAN (R 3.4.1)
#>  tools           3.4.2    2017-09-28 local         
#>  tuneR           1.3.2    2017-04-10 CRAN (R 3.4.1)
#>  utils         * 3.4.2    2017-09-28 local         
#>  webshot         0.4.2    2017-09-25 CRAN (R 3.4.2)
#>  withr           2.0.0    2017-07-28 CRAN (R 3.4.1)
#>  XML             3.98-1.9 2017-06-19 CRAN (R 3.4.0)
#>  xml2            1.1.1    2017-01-24 CRAN (R 3.4.1)
#>  yaml            2.1.14   2016-11-12 CRAN (R 3.4.1)
CorradoLanera added a commit to CorradoLanera/ari that referenced this issue Oct 7, 2017
muschellij2 added a commit to muschellij2/ari that referenced this issue May 22, 2018
@lhagen-isb
Copy link

lhagen-isb commented Jan 16, 2020

I believe I'm also having this issue with ARI as I'm getting a Load error that reports back a redundant file location:
Could not load file:///C:/Users/lhagen/Documents/file:/localhost/C:/Users/lhagen/Documents/ari_intro.html#1

Session Info
devtools::session_info()

  • Session info ---------------------------------------------------------------------------------------------------------------------
    setting value
    version R version 3.6.0 (2019-04-26)
    os Windows 10 x64
    system x86_64, mingw32
    ui RStudio
    language (EN)
    collate English_United States.1252
    ctype English_United States.1252
    tz America/Los_Angeles
    date 2020-01-16

  • Packages -------------------------------------------------------------------------------------------------------------------------
    package * version date lib source
    ari * 0.3.3 2020-01-12 [1] CRAN (R 3.6.0)
    assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
    aws.polly 0.1.2.1 2020-01-13 [1] CRAN (R 3.6.0)
    aws.signature 0.5.2 2019-08-08 [1] CRAN (R 3.6.2)
    backports 1.1.5 2019-10-02 [1] CRAN (R 3.6.1)
    base64enc 0.1-3 2015-07-28 [1] CRAN (R 3.6.0)
    callr 3.4.0 2019-12-09 [1] CRAN (R 3.6.2)
    cli 2.0.1 2020-01-08 [1] CRAN (R 3.6.2)
    crayon 1.3.4 2017-09-16 [1] CRAN (R 3.6.0)
    curl 4.3 2019-12-02 [1] CRAN (R 3.6.2)
    desc 1.2.0 2018-05-01 [1] CRAN (R 3.6.2)
    devtools 2.2.1 2019-09-24 [1] CRAN (R 3.6.2)
    digest 0.6.23 2019-11-23 [1] CRAN (R 3.6.2)
    ellipsis 0.3.0 2019-09-20 [1] CRAN (R 3.6.2)
    evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.0)
    fansi 0.4.1 2020-01-08 [1] CRAN (R 3.6.2)
    fs 1.3.1 2019-05-06 [1] CRAN (R 3.6.0)
    glue 1.3.1 2019-03-12 [1] CRAN (R 3.6.0)
    hms 0.5.3 2020-01-08 [1] CRAN (R 3.6.2)
    htmltools 0.4.0 2019-10-04 [1] CRAN (R 3.6.2)
    httr 1.4.1 2019-08-05 [1] CRAN (R 3.6.1)
    jsonlite 1.6 2018-12-07 [1] CRAN (R 3.6.1)
    knitr 1.26 2019-11-12 [1] CRAN (R 3.6.2)
    magrittr 1.5 2014-11-22 [1] CRAN (R 3.6.0)
    MASS 7.3-51.4 2019-03-31 [2] CRAN (R 3.6.0)
    memoise 1.1.0 2017-04-21 [1] CRAN (R 3.6.1)
    pillar 1.4.3 2019-12-20 [1] CRAN (R 3.6.2)
    pkgbuild 1.0.6 2019-10-09 [1] CRAN (R 3.6.2)
    pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 3.6.2)
    pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.6.2)
    prettyunits 1.1.0 2020-01-09 [1] CRAN (R 3.6.2)
    processx 3.4.1 2019-07-18 [1] CRAN (R 3.6.1)
    progress 1.2.2 2019-05-16 [1] CRAN (R 3.6.0)
    ps 1.3.0 2018-12-21 [1] CRAN (R 3.6.0)
    purrr 0.3.3 2019-10-18 [1] CRAN (R 3.6.2)
    R6 2.4.1 2019-11-12 [1] CRAN (R 3.6.2)
    Rcpp 1.0.3 2019-11-08 [1] CRAN (R 3.6.2)
    remotes 2.1.0 2019-06-24 [1] CRAN (R 3.6.2)
    rlang 0.4.2 2019-11-23 [1] CRAN (R 3.6.2)
    rmarkdown 2.0 2019-12-12 [1] CRAN (R 3.6.2)
    rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.6.0)
    rstudioapi 0.10 2019-03-19 [1] CRAN (R 3.6.0)
    rvest 0.3.5 2019-11-08 [1] CRAN (R 3.6.2)
    selectr 0.4-2 2019-11-20 [1] CRAN (R 3.6.2)
    sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.2)
    signal 0.7-6 2015-07-30 [1] CRAN (R 3.6.2)
    stringi 1.4.5 2020-01-11 [1] CRAN (R 3.6.0)
    stringr 1.4.0 2019-02-10 [1] CRAN (R 3.6.0)
    testthat 2.3.1 2019-12-01 [1] CRAN (R 3.6.2)
    text2speech 0.2.5 2019-06-24 [1] CRAN (R 3.6.2)
    tibble 2.1.3 2019-06-06 [1] CRAN (R 3.6.2)
    tuneR 1.3.3 2018-07-08 [1] CRAN (R 3.6.2)
    usethis 1.5.1 2019-07-04 [1] CRAN (R 3.6.2)
    vctrs 0.2.1 2019-12-17 [1] CRAN (R 3.6.2)
    webshot * 0.5.2 2019-11-22 [1] CRAN (R 3.6.2)
    withr 2.1.2 2018-03-15 [1] CRAN (R 3.6.0)
    xfun 0.12 2020-01-13 [1] CRAN (R 3.6.0)
    xml2 1.2.2 2019-08-09 [1] CRAN (R 3.6.2)
    zeallot 0.1.0 2018-01-28 [1] CRAN (R 3.6.0)

[1] C:/Users/lhagen/Documents/R/win-library/3.6
[2] C:/Program Files/R/R-3.6.0/library

@justross08
Copy link

I seem to be having the same problem, redundant filename

ari_narrate(

  • ari_example("ari_comments.Rmd"),
  • ari_example("ari_intro.html"),
  • voice = "Kendra")
    Could not load file:///C:/Users/justross/Dropbox/ARI/file:/localhost/C:/Users/justross/Documents/R/R-3.6.2/library/ari/test/ari_intro.html#1
    Error in webshot(url = paste0(slides, "#", slide_nums), file = img_paths, :
    webshot.js returned failure value: 1
    In addition: Warning messages:
    1: In normalizePath(path.expand(path), winslash, mustWork) :
    path[1]="file://localhost/C:\Users\justross\Documents\R\R-3.6.2\library\ari\test\ari_intro.html#1": The filename, directory name, or volume label syntax is incorrect

devtools::session_info()

  • Session info -------------------------------------------------------------------------------------------------------
    setting value
    version R version 3.6.2 (2019-12-12)
    os Windows 10 x64
    system x86_64, mingw32
    ui RStudio
    language (EN)
    collate English_United States.1252
    ctype English_United States.1252
    tz America/New_York
    date 2021-07-06

  • Packages -----------------------------------------------------------------------------------------------------------
    package * version date lib source
    ari * 0.3.5 2020-02-08 [1] CRAN (R 3.6.3)
    assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.2)
    aws.polly * 0.1.5.9000 2021-05-25 [1] local
    aws.s3 * 0.3.21 2020-04-07 [1] CRAN (R 3.6.3)
    aws.signature 0.6.0 2020-06-01 [1] CRAN (R 3.6.3)
    backports 1.1.5 2019-10-02 [1] CRAN (R 3.6.1)
    base64enc 0.1-3 2015-07-28 [1] CRAN (R 3.6.0)
    cachem 1.0.4 2021-02-13 [1] CRAN (R 3.6.3)
    callr 3.7.0 2021-04-20 [1] CRAN (R 3.6.3)
    cli 2.5.0 2021-04-26 [1] CRAN (R 3.6.3)
    crayon 1.3.4 2017-09-16 [1] CRAN (R 3.6.2)
    curl 4.3 2019-12-02 [1] CRAN (R 3.6.2)
    desc 1.3.0 2021-03-05 [1] CRAN (R 3.6.3)
    devtools 2.4.2 2021-06-07 [1] CRAN (R 3.6.2)
    digest 0.6.23 2019-11-23 [1] CRAN (R 3.6.2)
    dplyr 0.8.3 2019-07-04 [1] CRAN (R 3.6.2)
    ellipsis 0.3.1 2020-05-15 [1] CRAN (R 3.6.3)
    evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.2)
    fastmap 1.0.1 2019-10-08 [1] CRAN (R 3.6.2)
    fs 1.5.0 2020-07-31 [1] CRAN (R 3.6.3)
    glue 1.3.1 2019-03-12 [1] CRAN (R 3.6.2)
    hms 0.5.2 2019-10-30 [1] CRAN (R 3.6.2)
    htmltools 0.4.0 2019-10-04 [1] CRAN (R 3.6.2)
    httr 1.4.2 2020-07-20 [1] CRAN (R 3.6.3)
    jsonlite 1.7.2 2020-12-09 [1] CRAN (R 3.6.3)
    knitr 1.26 2019-11-12 [1] CRAN (R 3.6.2)
    lifecycle 1.0.0 2021-02-15 [1] CRAN (R 3.6.3)
    magrittr 1.5 2014-11-22 [1] CRAN (R 3.6.2)
    MASS 7.3-51.4 2019-03-31 [1] CRAN (R 3.6.2)
    memoise 2.0.0 2021-01-26 [1] CRAN (R 3.6.3)
    pillar 1.4.3 2019-12-20 [1] CRAN (R 3.6.2)
    pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 3.6.3)
    pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 3.6.2)
    pkgload 1.2.1 2021-04-06 [1] CRAN (R 3.6.3)
    prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.6.2)
    processx 3.5.2 2021-04-30 [1] CRAN (R 3.6.3)
    progress 1.2.2 2019-05-16 [1] CRAN (R 3.6.2)
    ps 1.6.0 2021-02-28 [1] CRAN (R 3.6.3)
    purrr 0.3.3 2019-10-18 [1] CRAN (R 3.6.2)
    R6 2.5.0 2020-10-28 [1] CRAN (R 3.6.3)
    Rcpp 1.0.3 2019-11-08 [1] CRAN (R 3.6.2)
    remotes 2.4.0 2021-06-02 [1] CRAN (R 3.6.2)
    rlang 0.4.10 2020-12-30 [1] CRAN (R 3.6.3)
    rmarkdown 2.0 2019-12-12 [1] CRAN (R 3.6.2)
    rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.6.3)
    rstudioapi 0.13 2020-11-12 [1] CRAN (R 3.6.3)
    rvest 0.3.5 2019-11-08 [1] CRAN (R 3.6.2)
    selectr 0.4-2 2019-11-20 [1] CRAN (R 3.6.2)
    sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.3)
    signal 0.7-6 2015-07-30 [1] CRAN (R 3.6.3)
    stringi 1.4.3 2019-03-12 [1] CRAN (R 3.6.0)
    stringr 1.4.0 2019-02-10 [1] CRAN (R 3.6.2)
    testthat 3.0.2 2021-02-14 [1] CRAN (R 3.6.3)
    text2speech 0.2.13 2020-06-30 [1] CRAN (R 3.6.3)
    tibble 2.1.3 2019-06-06 [1] CRAN (R 3.6.2)
    tidyselect 0.2.5 2018-10-11 [1] CRAN (R 3.6.2)
    tuneR * 1.3.3 2018-07-08 [1] CRAN (R 3.6.3)
    usethis 2.0.1 2021-02-10 [1] CRAN (R 3.6.3)
    vctrs 0.2.1 2019-12-17 [1] CRAN (R 3.6.2)
    webshot * 0.5.2 2019-11-22 [1] CRAN (R 3.6.3)
    withr 2.4.2 2021-04-18 [1] CRAN (R 3.6.3)
    xfun 0.11 2019-11-12 [1] CRAN (R 3.6.2)
    xml2 1.2.2 2019-08-09 [1] CRAN (R 3.6.2)
    zeallot 0.1.0 2018-01-28 [1] CRAN (R 3.6.2)

[1] C:/Users/justross/Documents/R/R-3.6.2/library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants