mikeyEcology / MLWIC2

Classify camera trap images using machine learning with R Shiny Apps
36 stars 17 forks source link

Problem with "make_input" process from shiny-app using Option 4 #17

Closed ghost closed 3 years ago

ghost commented 4 years ago

Dear Mike,

Thank you for much for your great repo

I have been trying to use MLWIC2 via shiny-app and for the "make_input" function, I got stuck at in the middle of the process of making the input file.

I was able to select option4 from the shiny-app popup, choose my image directory but when I click the "make an input file" button", this is the error message that I got

1

Could you please help me take a look at the server.r code for the "make_input" function ?

Also for the shiny-app to work, I used this trick from @ericnewkirk (https://github.com/mikeyEcology/MLWIC2/issues/12) and it helped me solve the problem of not able to open the app.

Thank you in advance for your help

ghost commented 3 years ago

I have found the solution for this,

I changed the following two lines on line 86 and 88 and :

Before: output_dir = gsub("\\\\", "/", normalizePath(dirname_output_dir())), path_prefix = gsub("\\\\", "/", normalizePath(dirname_path_prefix())),

After: path_prefix = gsub("\\\\", "/", paste0(normalizePath(dirname_path_prefix()), "/")), output_dir = gsub("\\\\", "/", paste0(normalizePath(dirname_output_dir()), "/")),