Giter Club home page Giter Club logo

Comments (3)

xrobin avatar xrobin commented on July 18, 2024

Hi, thanks for your report.
It looks like the tcltk package is installed but broken on the server.
Can you please try to run the following commands to confirm it?

find.package("tcltk", quiet=TRUE)
library(tcltk)
pb <- tkProgressBar("test progress bar", "Some information",
                    0, 2, 1)
setTkProgressBar(pb, 2)
close(pb)

These are commands of the tcltk package itself, used by pROC if the package is present.

If tcltk is indeed present and broken, you should ask your administrator to either fix the package if possible, or more likely in your case to uninstall it completely. For a quicker and dirty fix you can manually set the progress bar type to text or disable it completely:

options(pROCProgress = list(name = "none"))

See ?pROC for more options.

from proc.

elb0 avatar elb0 commented on July 18, 2024

Thanks so much for this response. The quick and dirty fix has worked well! I also tried what you recommended above in my personal RStudio Cloud account and ran into the same errors. In a response to the question I linked to above, someone responded:

Hello,

Due to the nature of the tcltk package and the way RStudio is build to work over the web, the two don't work well together. Unfortunately this isn't really something that we'll be able to workaround or support down the road.

Josh

That was 5 years ago, and so I guess it may just be that tcltk and RStudio Cloud can't play nicely together. If this is the case, is there a way to give an informative error message?

My personal RStudio Cloud attempt:

> find.package("tcltk", quiet=TRUE)
[1] "/opt/R/3.5.2/lib/R/library/tcltk"
> library(tcltk)
Warning message:
In fun(libname, pkgname) : couldn't connect to display ":0"
> pb <- tkProgressBar("test progress bar", "Some information",
+                     0, 2, 1)
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : 
  [tcl] invalid command name "toplevel".
> setTkProgressBar(pb, 2)
Error in setTkProgressBar(pb, 2) : object 'pb' not found

from proc.

xrobin avatar xrobin commented on July 18, 2024

It's going to be hard to catch this error message specifically without risking to make other errors less useful. After some thought I disabled the tcltk progress bars by default. They have been causing trouble with MacOS before, and a text progress bar seems more appropriate for a command line R terminal anyway.
I'm leaving the graphical progress bar for windows for now as I am not aware of specific issues with it, but I might change my mind and have consistent progress bar everywhere.

from proc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.