M40V / populse_mia

Multiparametric Image Analysis
Other
0 stars 0 forks source link

[CLOSED] MIA crashed when trying to iterate a pipeline #88

Open M40V opened 5 years ago

M40V commented 5 years ago

Issue by clemacq Wednesday May 22, 2019 at 09:00 GMT _Originally opened as https://github.com/populse/populse_mia/issues/88_


Describe the bug The project consist in:

Generated error


Copy the traceback here if the action has generated an error.
[Process] Calling nipype.interfaces.spm.preprocess.Smooth...
nipype.interfaces.spm.preprocess.Smooth(output_directory=/home/clement/gitRepos/populse_mia_dir/projects/preprocess/scripts, synchronize=2, in_files=['/home/clement/gitRepos/populse_mia_dir/projects/preprocess/data/raw_data/--1996-08-24_02-05-55-0_calc_--AX_FLAIR-00-01-34.427.nii'], matlab_cmd=/usr/local/MATLAB/R2018b/bin/matlab, mfile=True, out_prefix=s, paths=['/home/clement/Software/MP3-master/tools/spm12'], use_mcr=False, use_v8struct=True)

Exception hooking in progress ...

Clean up before closing mia done ...

Traceback (most recent call last):
  File "/home/clement/gitRepos/populse_mia_dir/python/populse_mia/pipeline_manager/iteration_table.py", line 234, in update_table
    scans_res = [getattr(document, TAG_FILENAME) for document in scans_list]
  File "/home/clement/gitRepos/populse_mia_dir/python/populse_mia/pipeline_manager/iteration_table.py", line 234, in <listcomp>
    scans_res = [getattr(document, TAG_FILENAME) for document in scans_list]
  File "/home/clement/.local/lib/python3.7/site-packages/populse_db/database.py", line 1510, in filter_documents
    filter_query = self.__filter_query(collection, filter_query)
  File "/home/clement/.local/lib/python3.7/site-packages/populse_db/database.py", line 1483, in __filter_query
    tree = populse_db.filter.filter_parser().parse(filter)
  File "/home/clement/.local/lib/python3.7/site-packages/populse_db/filter.py", line 109, in filter_parser
    _grammar_parser = Lark(filter_grammar)
  File "/home/clement/.local/lib/python3.7/site-packages/lark/lark.py", line 221, in __init__
    self.parser = self._build_parser()
  File "/home/clement/.local/lib/python3.7/site-packages/lark/lark.py", line 241, in _build_parser
    return self.parser_class(self.lexer_conf, parser_conf, options=self.options)
  File "/home/clement/.local/lib/python3.7/site-packages/lark/parser_frontends.py", line 141, in __init__
    self._prepare_match(lexer_conf)
  File "/home/clement/.local/lib/python3.7/site-packages/lark/parser_frontends.py", line 157, in _prepare_match
    raise ValueError("Dynamic Earley doesn't support weights on terminals", t, t.priority)
ValueError: ("Dynamic Earley doesn't support weights on terminals", TerminalDef('KEYWORD_LITERAL', '(?i:(?:(?i:(?:(?i:NULL)|(?i:TRUE)))|(?i:FALSE)))'), 2)

**To Reproduce**
Steps to reproduce the behavior:
1. Create a pipeline 
2. Click on 'iterate pipeline' checkbox
3. Click on 'Iterate over: Select' 
4. Check a checkbox (such as 'SequenceName')
5. See error

**Expected behavior**
Being able to iterate a given pipeline over different images of the same patient

**Desktop (please complete the following information):**
 - OS: Ubuntu 18.04
 - Populse 1.1.0
M40V commented 5 years ago

Comment by M40V Wednesday May 22, 2019 at 09:21 GMT


The setup to iterate a pipeline is a little different than running a single one. You can find a tutorial on the following link.

We implemented a fix to this error on the issue #84, you have a version of lark-parser not adapted the project (its's an open issue on populse_db). You will need to downgrade lark-parser to a version inferior to 0.7.0, you can use the following command on a terminal to fix this issue.

python3 -m pip install -I "lark-parser<0.7.0 --user"

M40V commented 5 years ago

Comment by servoz Wednesday May 22, 2019 at 10:35 GMT


I am currently testing a fix for the bug with the lark version>=0.7.0. If I find a couple of hours this week I hope to close this issue before friday afternoon

M40V commented 5 years ago

Comment by servoz Wednesday Jun 05, 2019 at 15:04 GMT


The bug with the lark>=0.7.0 version is like the pandora box (we discovered that the initial issue was only the tip of the iceberg ...).

Because we can live with it by simply using lark_parser ====0.6.7 we will come back later to try to fix it. We leave the ticket on populse_db problems open for now and we can close this one, which is actually a duplicate without any real connection to iteration