SpaCE-Lab-MSU / MSUGradSpatialEcology

Source code toe generate the labs for MSU Spatial Ecology Course. See the website for labs.
https://space-lab-msu.github.io/MSUGradSpatialEcology/
1 stars 0 forks source link

rendering Lab3 issues #3

Closed plzmsu closed 4 years ago

plzmsu commented 4 years ago

@billspat running into rendering problems - some of the packages have to be installed first in different ways. I installed them, and on the rendering, commented that part out. When I run each chunk directly in the console, this all works fine. Running into these issues rendering (note I figured out how to render 1 page):

rmarkdown::render_site("lab3_patch_design.Rmd")

Rendering: lab3_patch_design.Rmd |............. | 9% ordinary text without R code

|......................... | 18% label: unnamed-chunk-1 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

|...................................... | 27% ordinary text without R code

|................................................... | 36% label: unnamed-chunk-2 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

sh: line 1: 3209 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3213 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-2.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3217 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-3.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3221 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-4.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |................................................................ | 45% ordinary text without R code

|............................................................................ | 55% label: unnamed-chunk-3 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

trying URL 'https://nrimp.dfw.state.or.us/web%20stores/data%20libraries/files/ODFW/ODFW_805_5_wildlife_mgmt_units.zip' Content type 'application/x-zip-compressed' length 5740303 bytes (5.5 MB)

downloaded 5.5 MB

Error in get_nlcd(template = hood, label = "Hood", year = 2016, dataset = "Land_Cover", : No web coverage service at https://www.mrlc.gov/geoserver/mrlc_display/NLCD_2016_Land_Cover_L48/ows. See available services at https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities In addition: Warning messages: 1: In readOGR(file.path(data_path, "cb_2014_us_state_20m.shp")) : Z-dimension discarded 2: In showSRID(uprojargs, format = "PROJ", multiline = "NO") : Discarded ellps WGS 84 in CRS definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs 3: In showSRID(uprojargs, format = "PROJ", multiline = "NO") : Discarded datum WGS_1984 in CRS definition

plzmsu commented 4 years ago

It seems to get hung up on Line 162: hood_nlcd<-get_nlcd( template = hood, label="Hood", year = 2016, dataset = "Land_Cover", extraction.dir = paste0(data_path, "/FedData/"), )

billspat commented 4 years ago

when I run the render from R, it opens the gbif help page

start R (not R studio) Rmarkdown:clean_site() Rmarkdown::render_site() ....(renndering messages)... gbif help page from dismo shows up, press q to close ...(continues rendering)

plzmsu commented 4 years ago

Try just rendering the lab 3 page with the first line below. I updated it and got everything to work again on my computer but not rendering. Plus it requires reading in a file > 100 MB and you can't push to GitHub. So I had to comment out all of that. Super frustrating!!!!!

rmarkdown::render_site("lab3_patch_design.Rmd")

Rendering: lab3_patch_design.Rmd |............ | 9% ordinary text without R code

|........................ | 18% label: unnamed-chunk-1 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

|.................................... | 27% ordinary text without R code

|................................................ | 36% label: unnamed-chunk-2 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

sh: line 1: 2803 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2807 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-2.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2811 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-3.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2815 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-4.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |............................................................ | 45% ordinary text without R code

|....................................................................... | 55% label: unnamed-chunk-3 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

trying URL 'https://nrimp.dfw.state.or.us/web%20stores/data%20libraries/files/ODFW/ODFW_805_5_wildlife_mgmt_units.zip' Content type 'application/x-zip-compressed' length 5740303 bytes (5.5 MB)

downloaded 5.5 MB

trying URL 'http://oe.oregonexplorer.info/ExternalContent/SpatialDataforDownload/OR_NLCD_2011.zip' Content type 'application/x-zip-compressed' length 56580226 bytes (54.0 MB)

downloaded 54.0 MB

sh: line 1: 2854 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-3-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2858 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-3-2.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |................................................................................... | 64% ordinary text without R code

|............................................................................................... | 73% label: unnamed-chunk-4 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

sh: line 1: 2865 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-4-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |........................................................................................................... | 82% ordinary text without R code

|....................................................................................................................... | 91% label: unnamed-chunk-5 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

sh: line 1: 2874 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-5-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2878 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-5-2.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2882 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-5-3.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2886 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-5-4.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2890 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-5-5.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 2894 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-5-6.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |...................................................................................................................................| 100% ordinary text without R code

/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS lab3_patch_design.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output lab3_patch_design.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmd/lua/latex-div.lua --variable 'geometry:margin=1in' Error: LaTeX failed to compile lab3_patch_design.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See lab3_patch_design.log for more info.

plzmsu commented 4 years ago

@billspat After removing all of the importing of any NLCD (commented all out), and link to an image, I am still getting this error:

rmarkdown::render_site("lab3_patch_design.Rmd")

Rendering: lab3_patch_design.Rmd |............ | 9% ordinary text without R code

|........................ | 18% label: unnamed-chunk-1 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

|.................................... | 27% ordinary text without R code

|................................................ | 36% label: unnamed-chunk-2 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

sh: line 1: 3342 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3346 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-2.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3350 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-3.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3354 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-4.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |............................................................ | 45% ordinary text without R code

|....................................................................... | 55% label: unnamed-chunk-3 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

trying URL 'https://nrimp.dfw.state.or.us/web%20stores/data%20libraries/files/ODFW/ODFW_805_5_wildlife_mgmt_units.zip' Content type 'application/x-zip-compressed' length 5740303 bytes (5.5 MB)

downloaded 5.5 MB

sh: line 1: 3366 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-3-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |................................................................................... | 64% ordinary text without R code

|............................................................................................... | 73% label: unnamed-chunk-4 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

|........................................................................................................... | 82% ordinary text without R code

|....................................................................................................................... | 91% label: unnamed-chunk-5 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

|...................................................................................................................................| 100% ordinary text without R code

/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS lab3_patch_design.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output lab3_patch_design.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmd/lua/latex-div.lua --variable 'geometry:margin=1in'

Output created: docs/lab3_patch_design.html

plzmsu commented 4 years ago

when I run the render from R, it opens the gbif help page

start R (not R studio) Rmarkdown:clean_site() Rmarkdown::render_site() ....(renndering messages)... gbif help page from dismo shows up, press q to close ...(continues rendering)

no idea - doesn't happen w me. - I rendered just the lab3 page with: rmarkdown::render_site("lab3_patch_design.Rmd")

billspat commented 4 years ago

are you rendering to PDF? Ghostscript is for PDF I think. Does it render to HTML? if you can get that 100MB file somewhere public I can try it late tonight. Perhaps Google drive ? https://support.google.com/drive/thread/12769849?hl=en

Think of this as good reproducibility practice, ??

On Sep 19, 2020, at 2:34 PM, Phoebe Zarnetske notifications@github.com wrote:

@billspat After removing all of the importing of any NLCD (commented all out), and link to an image, I am still getting this error:

rmarkdown::render_site("lab3_patch_design.Rmd")

Rendering: lab3_patch_design.Rmd |............ | 9% ordinary text without R code

|........................ | 18% label: unnamed-chunk-1 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

|.................................... | 27% ordinary text without R code

|................................................ | 36% label: unnamed-chunk-2 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

sh: line 1: 3342 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3346 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-2.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3350 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-3.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! sh: line 1: 3354 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-2-4.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |............................................................ | 45% ordinary text without R code

|....................................................................... | 55% label: unnamed-chunk-3 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

trying URL 'https://nrimp.dfw.state.or.us/web%20stores/data%20libraries/files/ODFW/ODFW_805_5_wildlife_mgmt_units.zip' Content type 'application/x-zip-compressed' length 5740303 bytes (5.5 MB)

downloaded 5.5 MB

sh: line 1: 3366 Abort trap: 6 gs -dSAFER -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f lab3_patch_design_files/figure-latex/unnamed-chunk-3-1.pdf 2>&1 > /dev/null !!! Error: Ghostscript exited with error code 134! |................................................................................... | 64% ordinary text without R code

|............................................................................................... | 73% label: unnamed-chunk-4 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

|........................................................................................................... | 82% ordinary text without R code

|....................................................................................................................... | 91% label: unnamed-chunk-5 (with options) List of 3 $ message: logi FALSE $ results: chr "hide" $ warning: logi FALSE

|...................................................................................................................................| 100% ordinary text without R code

/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS lab3_patch_design.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output lab3_patch_design.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmd/lua/latex-div.lua --variable 'geometry:margin=1in'

Output created: docs/lab3_patch_design.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

plzmsu commented 4 years ago

Eek! thx. sometimes the most obvious issues are not apparent until someone else looks at it. Yes, it had "pdf" in the markdown header. Now I"ll try to put back in the FedData stuff so we can avoid getting the large file involved.