Cellprofiler: Failure to open new CP window from source and distribution

Created on 5 Oct 2017  路  15Comments  路  Source: CellProfiler/CellProfiler

File > Open new CP window , gives error:

Couldn't get a file descriptor referring to the console

Ubuntu 16.04
CP3.0.0rc7

Bug

All 15 comments

Same on Mac OS 10.12 rc7 but no one is going to die of this, I don't think it should hold up release :)

This appears to be a discrepancy between Mac and Linux: https://stackoverflow.com/questions/42463929/couldnt-find-a-file-descriptor-referring-to-the-console-on-ubuntu-bash-on-win
@AnneCarpenter does it still not work on OSX?

I think I have a working fix for this in this branch: https://github.com/AetherUnbound/CellProfiler/tree/issues/3334
Do you two mind trying it out?

I don't have CP set up from source! 馃槺 Hopefully @minh-doan can try it out.

@AetherUnbound thanks for the effort !

I cloned your branch issues/3334, (your git).
CP3 opened fine with wxPython 3.0.3
Then File > Open new CP window gives me this error in the terminal:

The file /Users/..../CellProfiler/cellprofiler/CellProfiler_python.command does not exist.

Tried it on Mac OS X 10.12

Can you please recheck.

Thanks !

The script to launch another CP window was removed in this commit.

I think we should decide if launching multiple CP windows is a desired feature and, if so, implement it properly. Or, delete the menu option altogether.

Wow, I didn't even realize that was a thing. I'm all for removing the option, but (knowing that there once was a script that accomplished this) I think it might be possible to fix this behavior.

I'm also in favor of removing the option given that no one reported the feature as broken in the year-and-a-half it hasn't been available, indicating a lack of use.

Well, let's not be hasty!
just kidding. Let's torch it.

(the use case is to open two pipelines and compare them side by side, maybe even drag and drop modules from one to the other. But if people are not complaining maybe they do not do this very often)

As an essay dev., I sure do it often, for e.g. open a pipeline someone on forum made, then compare to my version of it. But agree with Anne that I'm surprised no one else reported this on the forum.

Ah, I'd failed to consider that it does work in CP2.2 from the distributed package. My argument is invalid.

(the use case is to open two pipelines and compare them side by side, maybe even drag and drop modules from one to the other. But if people are not complaining maybe they do not do this very often)

I've heard this come up as a use-case before (and Minh just verified it). That's a good case for restoring this behavior from source, and ensuring it works on Ubuntu.

On OS X, with CellProfiler 2 and 3 installed, File > Open a New CP Window starts CellProfiler 2. When I remove CellProfiler 2, nothing happens. I suspect this is because it looks for CellProfiler.app instead of CellProfiler-3.0.0.app.

Okay, thanks all for the input! I will work to find a cross-platform solution for this :+1:

I've made a change in the branch mentioned above, @mcquin and @minh-doan, do you mind trying it?

@AetherUnbound I think your solution will only work when a non OS X user also has CellProfiler installed from source. I suspect we'll need to do something like what's suggested in https://stackoverflow.com/a/10294435 to properly pick up how CellProfiler was started.

When os.system("cellprofiler") runs, the parent process hangs until the new CellProfiler window is closed. I suspect we'll need to spawn a new process and figure out how to handle closing CellProfiler (close itself and all open windows? only close itself?).

Furthermore, there are a few ways to run CellProfiler from source:

  • cellprofiler (post pip install)
  • python -m cellprofiler
  • python cellprofiler/__main__.py

The last two appear to require making cellprofiler/__main__.py executable. This seems fine, but we should do a little research to validate that idea.

Finally, I don't have a good grasp on how to run the frozen version. I suspect that could require some "build and try it" development.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

katrinleinweber picture katrinleinweber  路  3Comments

imagejan picture imagejan  路  8Comments

bchidest picture bchidest  路  6Comments

dlogan picture dlogan  路  9Comments

nickholway picture nickholway  路  9Comments