NewGraphEnvironment / fish_passage_bulkley_2022_reporting

https://newgraphenvironment.github.io/fish_passage_bulkley_2022_reporting/
Creative Commons Zero v1.0 Universal
0 stars 2 forks source link

pdf will not run because it can't find waterfall crossing_all.JPG #64

Closed NewGraphEnvironment closed 1 year ago

NewGraphEnvironment commented 1 year ago
Output created: Bulkley2022.html
Warning: A runtime exception has occured while executing JavaScript
  Runtime exception message:
    ReferenceError: $ is not defined
    at http://127.0.0.1:3732/Bulkley2022.html:32186:9
Error in force(expr) : 
  Failed to generate output. Reason: Failed to open http://127.0.0.1:3732/data/photos/2022091003/crossing_all.JPG (HTTP status code: 404)
In addition: There were 50 or more warnings (use warnings() to see the first 50)
NewGraphEnvironment commented 1 year ago
> pscis_all %>%
+   distinct(site_id) %>%
+   arrange(site_id) %>%
+   # head() %>% #test
+   pull(site_id) %>%
+   purrr::map(fpr_photo_amalg_cv)
Error in magick_image_append(image, stack) : 
  rsession-arm64: NegativeOrZeroImageSize `' @ error/image.c/CloneImage/794

tried to build amalgamated photos but won't run. first impression is that it is because there are directories that are not present.

setdiff( pscis_all %>%
    distinct(site_id) %>%
    arrange(site_id) %>%
    # head() %>% #test
    pull(site_id) ,

    list.dirs('data/photos', full.names = F, recursive = F)
)

[1] 198110

setdiff(  list.dirs('data/photos', full.names = F, recursive = F),

          pscis_all %>%
            distinct(site_id) %>%
            arrange(site_id) %>%
            # head() %>% #test
            pull(site_id)
)

[1] "1493" "198066" "198115" "198117" "admin"

NewGraphEnvironment commented 1 year ago

right - makes sense I can't run fpr_photo_amalg_cv because I don't have the raw photos required to make the crossing_all.JPGs. Still looks like 198110 is missing photos though.

Need to get a solution to cleanly access those onedrive photos eventually - will file a separate issue

@Mateo9569 - can you deal with 198110 and run the fpr_photo_amalg_cv section so we get those waterfall photos back and close if it will build the pdf? you don't need to run the tools::compactPDF section of the run.R script for now if you still need to setup ghostscript. just need to see if it will build

NewGraphEnvironment commented 1 year ago

just needed to filter out the sites I didn't have photos for https://github.com/NewGraphEnvironment/fish_passage_bulkley_2022_reporting/blob/3d7b259beb5b2a843648c0881a06162bf55eda2c/scripts/01_prep_inputs/0120-photos.R#L402

pscis_all %>%
  distinct(site_id) %>%
  arrange(site_id) %>%
  # put this here to test if it is the problem
  filter(site_id != 198110) %>%
  filter(site_id != 123750) %>%
  filter(site_id != 198116) %>%
  # head() %>% #test
  pull(site_id)  %>% 
  purrr::map(fpr_photo_amalg_cv)

was able to see which ones were missing by running https://github.com/NewGraphEnvironment/fish_passage_bulkley_2022_reporting/blob/3d7b259beb5b2a843648c0881a06162bf55eda2c/scripts/01_prep_inputs/0120-photos.R#L383