Macquarie-MEG-Research / Biscuit

GUI for easy MEG to BIDS conversion
https://macquarie-meg-research.github.io/Biscuit/
MIT License
7 stars 1 forks source link

Biscuit does not start due to missing path name #37

Open juliankeil opened 1 year ago

juliankeil commented 1 year ago

Hi, I'm trying to use Biscuit to convert MEG Data to BIDS on Ubuntu 22.04.

Describe the bug I installed Biscuit according to the instructions on https://macquarie-meg-research.github.io/Biscuit/installation/ using the "Complete" Install. When I try to run Biscuit (either directly from the command line using "Biscuit" or from within Python 3.10, I get the error:

Traceback (most recent call last): File "", line 1, in File "/home/neuraltrain/anaconda3/lib/python3.10/site-packages/Biscuit/init.py", line 16, in run m = MainWindow(master=root) File "/home/neuraltrain/anaconda3/lib/python3.10/site-packages/Biscuit/Windows/MainWindow.py", line 72, in init self._load_settings() File "/home/neuraltrain/anaconda3/lib/python3.10/site-packages/Biscuit/Windows/MainWindow.py", line 164, in _load_settings if not op.exists(self.settings["DATA_PATH"]): File "/home/neuraltrain/anaconda3/lib/python3.10/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not tuple

To Reproduce

  1. install Biscuit on Ubuntu 3.10: (base) neuraltrain@neuraltrain-laptop:~$ pip install -U https://github.com/Macquarie-MEG-Research/Biscuit/releases/download/v0.9.9/Biscuit-0.9.9complete-py3-none-any.whl
  2. Run Biscuit: (base) neuraltrain@neuraltrain-laptop:~$ Biscuit
  3. Alternatively, open Python, import "run" from Biscuit and run(): (base) neuraltrain@neuraltrain-laptop:~$ python3 Python 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:08:06) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

    from Biscuit import run run()

Expected behavior On Windows, starting Biscuit directly from the command line does not work, but starting from within Python works.

Error message produced Traceback (most recent call last): File "", line 1, in File "/home/neuraltrain/anaconda3/lib/python3.10/site-packages/Biscuit/init.py", line 16, in run m = MainWindow(master=root) File "/home/neuraltrain/anaconda3/lib/python3.10/site-packages/Biscuit/Windows/MainWindow.py", line 72, in init self._load_settings() File "/home/neuraltrain/anaconda3/lib/python3.10/site-packages/Biscuit/Windows/MainWindow.py", line 164, in _load_settings if not op.exists(self.settings["DATA_PATH"]): File "/home/neuraltrain/anaconda3/lib/python3.10/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not tuple

Operating system/Python environment

Additional context When first also importing MNE, the error message changes to: Traceback (most recent call last): File "", line 1, in File "/home/neuraltrain/anaconda3/envs/mne/lib/python3.10/site-packages/Biscuit/init.py", line 16, in run m = MainWindow(master=root) File "/home/neuraltrain/anaconda3/envs/mne/lib/python3.10/site-packages/Biscuit/Windows/MainWindow.py", line 53, in init self.master.tk.call('wm', 'iconphoto', self.master._w, img) _tkinter.TclError: can't use "pyimage2" as iconphoto: not a photo image

Thanks a lot for your help! Best, Julian

monkeyman192 commented 1 year ago

Have a look in your settings directory (_/.Biscuit/), there should be a settings.pkl file. No idea why I didn't store settings in a more sensible format, but if you unpickle this file, have a look at the DATA_PATH value and see what it is. I guess somehow it's being set wrong? The second error I guess may be due to changes in a dependency where the returned type has changed over the last few years.