Open joshuacwnewton opened 2 years ago
(Anyways, to continue debugging #21, I just quickly modified self.find_index
to return 0
if the label can't be found. Once I did that, then the plugin loaded fine. But obviously I don't recommend that as a fix -- I just did that to demonstrate that this is the only issue I ran into.)
Hi @joshuacwnewton. I just encountered the same problem when trying to open the GUI in WSL2. I don't really understand what happens here especially since it works just fine on macOS... What OS are you using ?
It seems to me that this happens because the dropdown box is empty when we initialize the GUI so we get selection = ""
. and nothing is displayed. However, I don't get why it does not occur on macOS...
What OS are you using ?
I encountered the issue on Ubuntu 20.04, so that would align with you encountering it in WSL2 (I presume with Ubuntu?)
Indeed I use a Ubuntu 20.04 distribution inside WSL2. Have you ever experienced something similar in the past (something that works on macOS but not on Ubuntu) ?
While trying to debug #21, I followed the installation instructions here, then followed the "Running" instructions here. All I did was run
shimming-toolbox
then Settings -> Ortho View (1) -> Shimming Toolbox.Nothing happens in the GUI, and in the terminal I see:
So, for some reason,
index
isNone
.I did some print-statement debugging, and found that
selection
is returned as an empty string""
.https://github.com/shimming-toolbox/fsleyes-plugin-shimming-toolbox/blob/eadde8445cf4d61e14f9c5648b42b268585c0d01/fsleyes_plugin_shimming_toolbox/st_plugin.py#L389
So,
self.find_index()
fails to find anything, hence the crash:https://github.com/shimming-toolbox/fsleyes-plugin-shimming-toolbox/blob/eadde8445cf4d61e14f9c5648b42b268585c0d01/fsleyes_plugin_shimming_toolbox/st_plugin.py#L399
I'm still not sure why
selection
is an empty string in the first place. I thought I would stop here and report to get insight from folks who have worked onst_plugin.py
for longer.