mikeyEcology / MLWIC2

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

Problems to setup environment #12

Open teuzindahuz opened 4 years ago

teuzindahuz commented 4 years ago

When I run the function MLWIC2::runShiny('setup'), I cannot select the folder where Python is located.

mikeyEcology commented 4 years ago

Can you select it on the top half of the screen?

teuzindahuz commented 4 years ago

No, the page become dark and freezes. However, it seems that with MLWIC::setup() is working.

ericnewkirk commented 4 years ago

Hi @mikeyEcology,

I ran into this same issue. Line 7 in setup_shiny.R should read:

shinyFiles::shinyDirChoose(input, 'python_loc', roots=volumes(), session=session)

instead of

shinyFiles::shinyDirChoose(input, 'python_loc', roots=volumes, session=session)

shinyFiles::getVolumes returns a function which can then be called to return the vector of available drives, instead of returning the vector directly. From the help:

It returns a function that returns a named vector of available volumes on the system. This construction makes it dynamic so that a shinyFiles instance reflects new volumes as they get added (e.g. usb drives).

Hope that helps, Eric

mikeyEcology commented 4 years ago

Thank you @ericnewkirk! This change must have occurred as part of updating to R4.0? It worked fine before, but I made these updates to the shiny apps. Thanks for your help.

ericnewkirk commented 4 years ago

No problem! I think they just changed the shinyFiles package to make it scan for new drives every time you open a dialog, rather than just once when you open the first one. Hopefully that change doesn't break anything for anyone with the older version of shinyFiles.

grse7250 commented 3 years ago

This is a small point of clarification to the instructions for what it is worth. Under Step 2 it would be useful to explicitly say "In R Setup your environment for using MLWIC2 using the function setup."

I only say this because it had been awhile since I had used R and it was not clear that step 2 is something you are supposed to do in R. After pondering and trying a few things for 5 minutes I figured it out.