MetaSys-LISBP / IsoCor

IsoCor: Isotope Correction for mass spectrometry labeling experiments
https://isocor.readthedocs.io
GNU General Public License v3.0
24 stars 9 forks source link

Very early bug in GUI load on Windows 10 #25

Closed AndrewRosko closed 7 months ago

AndrewRosko commented 1 year ago

I have used Isocor without issue for months on a Windows 7 computer. However, after installing on a Windows 10 computer, the GUI fails to open. When loading as a module, I get the following traceback:

File "C:\Users\arosko\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\arosko\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\arosko\AppData\Local\Programs\Python\Python310\lib\site-packages\isocor__main.py", line 9, in isocor.ui.isocorgui.start_gui() File "C:\Users\arosko\AppData\Local\Programs\Python\Python310\lib\site-packages\isocor\ui\isocorgui.py", line 759, in start_gui app = GUIinterface(master=root) File "C:\Users\arosko\AppData\Local\Programs\Python\Python310\lib\site-packages\isocor\ui\isocorgui.py", line 244, in init self.createWidgets() File "C:\Users\arosko\AppData\Local\Programs\Python\Python310\lib\site-packages\isocor\ui\isocorgui.py", line 602, in createWidgets self.isotopictracerEntered = tk.StringVar('') File "C:\Users\arosko\AppData\Local\Programs\Python\Python310\lib\tkinter\init.py", line 540, in init Variable.init(self, master, value, name) File "C:\Users\arosko\AppData\Local\Programs\Python\Python310\lib\tkinter\init.py", line 372, in init__ self._root = master._root() AttributeError: 'str' object has no attribute '_root'

It seems as though this indicates that the bug is in Tkinter, however, at least one other (unrelated, one we wrote ourselves) module with a Tkinter-based GUI loads normally on this same computer, in the same Python environment.

gmat commented 1 year ago

thanks for your issue. The use for newest version of tk library disclose this bug. The signature of tk.StringVar() changes. A newer release of isocor will correct this. If you're in a hurry, you can apply the correction directly https://github.com/MetaSys-LISBP/IsoCor/commit/4a4d46d14c0361636c1e837b82068dc9396eda46

Sorry @pierremillard I wanted to open a PR to open a discussion but I forgot my privilege access to the code source oups :confused:

pierremillard commented 1 year ago

Thanks @gmat ! I will open a PR & release 2.2.1 as soon as @AndrewRosko will confirm this fix solves his issues :)

gmat commented 1 year ago

He should. Before changes I easily get the same issue on linux with python 3.11. For information, the code could also be corrected by using name's argument like this tk.StringVar(value='') but as we've got 7 tk.StringVar() in this depot but only one with '' as argument I choose to remove this one.

chuyaowang commented 1 year ago

Hi, may I ask when will the fix be released on conda or pip? I tried to install the fix via pip install git+https://github.com/MetaSys-LISBP/IsoCor@master but it did not install the fixed version.

chuyaowang commented 1 year ago

I changed the line of code manually and the gui opens now.

pierremillard commented 1 year ago

Hi @chuyaowang , thanks for your feedback. I am not sure yet why installing via pip install git+https://github.com/MetaSys-LISBP/IsoCor@master did not work. I will check and release the fix asap via pip and conda. Sorry for the inconvenience.

pierremillard commented 1 year ago

Dear @AndrewRosko and @chuyaowang ,

We have just released an update of IsoCor (v2.2.1) with a fix of the reported bug. Sorry for the delay, we had to replace our previous CI/CD pipeline by switching from Travis to Github actions because TravisCI is no longer free (thanks @llegregam for the work!). The next releases will be much faster.

To install this version, just run pip install --upgrade isocor.

Let us know if you encounter any issue.

Best, Pierre