populse / populse_mia

Multiparametric Image Analysis
Other
0 stars 0 forks source link

Mia crash if we want to save a project with the same name as the project open in another instance #15

Closed servoz closed 5 days ago

servoz commented 3 weeks ago

Currently, if we want to save a project with the same name as a project open in another instance of Mia (two Mia open at the same time), Mia crashes with:

Traceback (most recent call last):
  File "/data/Git_Projects/populse_mia/populse_mia/user_interface/main_window.py", line 1310, in save_project_as
    self.project = Project(as_folder_rel, False)
  File "/data/Git_Projects/populse_mia/populse_mia/data_manager/project.py", line 171, in __init__
    raise IOError(
OSError: The project at ../../home/econdami/Data/IRM/projects_mia_dev/projects_mia/test is already opened in another instance of the software.

We want to make sure that

servoz commented 5 days ago

After examining this ticket, I see two proposals.

  1. Mia prohibits the opening of two instances at the same time. It's simple, quick and effective.
  2. Mia allows several instances to be opened at the same time. The idea is appealing, but it requires procedures to be put in place (to my knowledge, they don't really exist yet) in order to partition projects, configurations, databases, etc. and not to modify what is used in another instance running at the same time.

Of course, option 2 is tempting ... but requires a lot more work than option 1.

As I don't have a very clear idea of the real need for option 2 (what's the point of spending time implementing an option if it's not very important?), I've just forbidden the opening of two instances of Mia at the same time (cd4846f).

If option 2 is essential, we can always implement it later.