MNE-Python implementation of SSS/tSSS crashes Matlab

Dear Brainstorm users,

I started using the MNE-Python implementation of SSS/tSSS. After some successfull runs, my Matlab crashed and closed without error message. I went through the code and it seems that it crashed in "out_mne_data.m" at line 180. I commented lines 181 -190 and it did not crash anymore after multiple runs now. Results look reasonable, but could it create an issue "ignoring" these lines? What do you think? (See information on platform etc. below)

lines 181-190 (out_mne_data.m):
% try
% % Read date string to a py.datetime object
% dt = py.dateutil.parser.parse(MeasDate);
% % Convert to UTC
% tz = py.datetime.datetime.now().astimezone().tzinfo;
% dt = dt.replace(pyargs('tzinfo', tz));
% dt = dt.astimezone(py.datetime.timezone(py.datetime.timedelta(0)));
% mneInfo{'meas_date'} = dt;
% catch
% end

Platform: Windows-10
Python: 3.8.6
CPU: Intel64 Family 6 Model 85 Stepping 4, GenuineIntel: 20 cores
Memory: 127.7 GB
mne: 0.22.1

Thank you for reporting this issue.
It looks like the Matlab's try/catch block is not capable of capturing correctly the errors with the python code...
We probably have something to fix here, maybe adding checks around the format of MeasDate.

If you are very familiar with Matlab, you could try setting a breakpoint at line 180, start the computation, and when it stops explore step by step what is happening. Knowing which line crashes would already help.
Another thing you could try: commenting out only the try/catch/end lines, and see how Matlab handles it.

Otherwise, could you share a (small) example file so I can try to reproduce the error on my end?
=> Upload the zipped .fif file somewhere and post the download link here.

Could you also copy-paste the output of the ver command in Matlab?

Thanks