MLWIC2 icon indicating copy to clipboard operation
MLWIC2 copied to clipboard

Problems to setup environment

Open teuzindahuz opened this issue 4 years ago • 6 comments

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

teuzindahuz avatar Jun 09 '20 14:06 teuzindahuz

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

mikeyEcology avatar Jun 09 '20 14:06 mikeyEcology

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

teuzindahuz avatar Jun 09 '20 14:06 teuzindahuz

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

ericnewkirk avatar Jul 03 '20 21:07 ericnewkirk

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.

mikeyEcology avatar Aug 27 '20 18:08 mikeyEcology

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.

ericnewkirk avatar Sep 02 '20 14:09 ericnewkirk

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.

grse7250 avatar Nov 06 '20 19:11 grse7250