ctmm-initiative / ctmmweb

Web app for analyzing animal tracking data, built upon ctmm R package
http://biology.umd.edu/movement.html
GNU General Public License v3.0
30 stars 21 forks source link

Error: S3 method ‘summary.character’ not found #97

Closed markbidwell closed 4 years ago

markbidwell commented 5 years ago

I get the following error after attempting to do model selection on Cilla.

Fitting models OU anisotropic, OUf anisotropic, OUF isotropic. user system elapsed 303.72 0.91 317.75 Warning: Error in utils::getS3method: S3 method 'summary.character' not found 141: [.data.table 139: ctmmweb:::compare_models 138: [C:/Users/bidwellm/Documents/R/R-3.5.2/library/ctmmweb/app/server.R#2117] 122: try_models 121: [C:/Users/bidwellm/Documents/R/R-3.5.2/library/ctmmweb/app/server.R#2130] 105: summary_models 103: exprFunc [C:/Users/bidwellm/Documents/R/R-3.5.2/library/ctmmweb/app/server.R#2197] 102: widgetFunc 101: func 88: origRenderFunc 87: renderFunc 83: origRenderFunc 82: output$tried_models_summary 2: shiny::runApp 1: app

I'm running R 3.5.2 and master ctmmweb downloaded from github today.

Thanks for any help!

image

chfleming commented 5 years ago

I saw this error at the last AniMove (Yale) and it went away after some basic cleaning. I would suggest

  1. Updating R and your packages. Also try updating ctmm from GitHub.
  2. Make sure you aren't saving/loading sessions in RStudio (Tools/Global Options/Workspace). When you start a fresh session, your environment should be empty and no packages should be loaded.
markbidwell commented 5 years ago

Thanks Chris. I reinstalled R (now running 3.6), RStudio (latest version) and ctmmweb (from GitHub) and my workspace is clean when I open R Studio. I still get the same error. Any other advice?

chfleming commented 5 years ago

If you can provide us with some data to reproduce the error, then we can look into it.

[Sorry, I failed to notice that you were using Cilla.]

xhdong-umd commented 5 years ago

I guess OP was using built-in data. There were several similar bug reports, most seemed to occurred in running model on single animal, which will use ctmm internal parallel options to use multi cores (vs the default mode use n cores in n individuals) .

Parallel bugs are hard to reproduce and troubleshoot, one option is to let the 'disable parallel' option also turn off the parallel mode for single animal, thus user can try if the problem can be avoided by disabling parallel.

chfleming commented 5 years ago

Yes, definitely. parallel behavior in R is wildly different across R versions and operating systems.

xhdong-umd commented 5 years ago

I checked and found the disable parallel option already turn off all parallel even with single individual.

@markyxe , can you turn off parallel by uncheck the checkbox of parallel mode in App Options box of import Data page, and try again?

markbidwell commented 5 years ago

Thank you for your help. I can try this, but will parallel be a problem for many individuals? I am only trying one individual to see if I can get it working, but I would like to use multiple individuals. Thank you again.

On Jun 21, 2019, at 8:44 PM, xianghui dong notifications@github.com wrote:

I checked and found the disable parallel option already turn off all parallel even with single individual.

@markyxe , can you turn off parallel by uncheck the checkbox of parallel mode in App Options box of import Data page, and try again?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

xhdong-umd commented 5 years ago

You can try both options for single or multiple individuals. with parallel off at least we can know if the problem was caused by parallel.

chfleming commented 5 years ago

Can we catch the parallel error in ctmm.select, turn off parallelization and then re-run automatically?

xhdong-umd commented 5 years ago

I checked the code, I tried to catch any error and give a proper error msg instead of this. I don't have reproducible example right now to check, though I can try to make the check condition better.

I am not sure run automatically again is what user want, maybe give msg to suggest user to do this.

chfleming commented 5 years ago

Yeah, automatically running again could get stuck in a loop. A more informative error or maybe even a dialogue box would be better.

markbidwell commented 5 years ago

I haven't run into this problem while working on a different computer at home this weekend, so it may depend on which versions of Windows, R, Rstudio, ctmm and ctmmweb are installed. When I get back to my work computer, I'll try a single individual with parallel turned off.

xhdong-umd commented 4 years ago

Closed with new update on error checking, see comments in #96.