PrincetonUniversity / Iseult

Python plotting program for Tristan-MP
https://princetonuniversity.github.io/Iseult/
GNU General Public License v3.0
7 stars 7 forks source link

click cancel in menu fails #26

Closed ntoles closed 3 weeks ago

ntoles commented 1 month ago

Fresh clone from github: git clone git@github.com:bcaddy/Iseult.git git checkout --track origin/master-tv2Spectra

[01:33][anatoly@stellar-vis1 ~/tig/bob/Iseult]$ git branch master

When I open iseult from install directory, it opens the dialog. Now if I click Cancel on that dialog, it fails with this message:

[01:31][anatoly@stellar-vis1 ~/tig/bob/Iseult]$ ./iseult.py Traceback (most recent call last): File "/tigress/anatoly/bob/Iseult/./iseult.py", line 61, in runMe(cmd_args) File "/tigress/anatoly/bob/Iseult/./src/main_app.py", line 3475, in runMe app = MainApp('Iseult', cmd_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tigress/anatoly/bob/Iseult/./src/main_app.py", line 1877, in init self.findDir() File "/tigress/anatoly/bob/Iseult/./src/main_app.py", line 2234, in findDir if not self.checkAndFindFilePaths(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tigress/anatoly/bob/Iseult/./src/main_app.py", line 2130, in checkAndFindFilePaths self.dirname = pathlib.Path(self.dirname) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/licensed/anaconda3/2023.9/lib/python3.11/pathlib.py", line 871, in new self = cls._from_parts(args) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/licensed/anaconda3/2023.9/lib/python3.11/pathlib.py", line 509, in _from_parts drv, root, parts = self._parse_args(args) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/licensed/anaconda3/2023.9/lib/python3.11/pathlib.py", line 493, in _parse_args a = os.fspath(a) ^^^^^^^^^^^^ TypeError: expected str, bytes or os.PathLike object, not tuple

ntoles commented 1 month ago

Also, I can't load any dataset. When I click OK on direcory that has PIC files, nothing happens and the file selector window does not close.

image
bcaddy commented 1 month ago

It exits with a similar message if you hit cancel before my changes too. It probably should exit since hitting cancel effectively leaves it without data.

I can reproduce the loop. It looks like it only happens for Tristan v2 datasets in the native nested directory format. I'll work on a fix.

bcaddy commented 1 month ago

should be fixed now