nel-lab / mesmerize-core

High level pandas-based API for batch analysis of Calcium Imaging data using CaImAn
Other
61 stars 15 forks source link

mcorr_cnmf notebook running cnmf error #302

Closed CharlotteWenxin closed 5 months ago

CharlotteWenxin commented 5 months ago

Please be as descriptive as possible about your issue and provide all the information below. If you encounter an error please provide the full traceback, i.e. the entire error message etc. and screenshots. Assistance is provided by the maintainers on a voluntary basis.

Screenshots Please include screenshots that describe the issue. image

Additional context

Hello,

I'm running the mcorr_cnmf notebook with the demo data. When I tried to run index = -1 # most recently added item df.iloc[index].caiman.run(): I got this in the output of the df.

'success': False, 'traceback': 'Traceback (most recent call last):\n File "C:\Users\Zimmer_lab\anaconda3\envs\mescore\lib\site-packages\mesmerize_core\algorithms\cnmf.py", line 118, in run_algo\n cnmf_hdf5_path = output_path.relative_to(output_dir.parent)\n File "C:\Users\Zimmer_lab\anaconda3\envs\mescore\lib\pathlib.py", line 818, in relative_to\n raise ValueError("{!r} is not in the subpath of {!r}"\nValueError: \'C:\\Users\\Zimmer_lab\\caiman_data\\mesmerize-batch\\79f1619f-5b0a-4c51-a684-db2391c34a6b\\79f1619f-5b0a-4c51-a684-db2391c34a6b.hdf5\' is not in the subpath of \'\\Users\\Zimmer_lab\\caiman_data\\mesmerize-batch\' OR one path is relative and the other is absolute.\n'

Thank you very much for your help in advance.

kushalkolar commented 5 months ago

You're probably missing C: when you set the parent data path.

Also you can just do df.iloc[ix].cnmf.get_output() or df.iloc[ix].mcorr.get_output() and it will print the traceback nicely, it's not intended for users to manually dig into the output dict.

CharlotteWenxin commented 5 months ago

Thank you for your help!