MLWIC2
MLWIC2 copied to clipboard
Problems to setup environment
When I run the function MLWIC2::runShiny('setup')
, I cannot select the folder where Python is located.
Can you select it on the top half of the screen?
No, the page become dark and freezes. However, it seems that with MLWIC::setup()
is working.
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
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.
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.
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.