incf-nidash / nidm-specs

Neuroimaging Data Model (NIDM): describing neuroimaging data and provenance
nidm.nidash.org
Other
33 stars 30 forks source link

Error in testing code - refresh.py #410

Closed khelm closed 7 years ago

khelm commented 7 years ago

I ran refresh.py and got:

karl@karl-Satellite-C655D:~/Work/INCF/nidm/nidm$ python scripts/refresh.py
Traceback (most recent call last):
  File "scripts/refresh.py", line 17, in <module>
    import recompute_all_ex
  File "/home/karl/Work/INCF/nidm/nidm/scripts/../nidm/nidm-results/scripts/recompute_all_ex.py", line 9, in <module>
    import create_term_examples
  File "/home/karl/Work/INCF/nidm/nidm/scripts/../nidm/nidm-results/scripts/create_term_examples.py", line 10, in <module>
    from create_example_from_templates import ExampleFromTemplate
  File "/home/karl/Work/INCF/nidm/nidm/scripts/../nidm/nidm-results/scripts/create_example_from_templates.py", line 78
    except KeyError, k:
                   ^
SyntaxError: invalid syntax

I believe this is a current error since I just merged my master with the upstream master.

cmaumet commented 7 years ago

Hi @khelm! Could you point me to which branch you are running this on? That would help me reproduce the error locally to track this down. Thanks!

khelm commented 7 years ago

the branch is khelm:reconcile_with_lucidchart_ver7

cmaumet commented 7 years ago

Have you recently updated to python 3? I can reproduce the error with py3 but the command runs fine with python 2. Ideally refresh.py should handle both python versions...

khelm commented 7 years ago

I have two instances of python of that computer and thought that it was currently pointing to 2.7, but maybe not, I'll check - thanks!

khelm commented 7 years ago

After pointing to python 2.7 I now get the following error:

(py27) karl@karl-Satellite-C655D:~/Work/INCF/nidm/nidm$ python scripts/refresh.py
Traceback (most recent call last):
  File "scripts/refresh.py", line 17, in <module>
    import recompute_all_ex
  File "/home/karl/Work/INCF/nidm/nidm/scripts/../nidm/nidm-results/scripts/recompute_all_ex.py", line 9, in <module>
    import create_term_examples
  File "/home/karl/Work/INCF/nidm/nidm/scripts/../nidm/nidm-results/scripts/create_term_examples.py", line 10, in <module>
    from create_example_from_templates import ExampleFromTemplate
  File "/home/karl/Work/INCF/nidm/nidm/scripts/../nidm/nidm-results/scripts/create_example_from_templates.py", line 22, in <module>
    from nidmresults.owl.owl_reader import OwlReader
ImportError: No module named nidmresults.owl.owl_reader
cmaumet commented 7 years ago

@khelm: This looks like the nidmresults module is missing. Can you check if all the packages from requirements.txt are installed (within your py 2.7 environment).

khelm commented 7 years ago

@cmaumet : Thanks, I see what happened. I lost some of my packages when I moved to setting up separate 2.7 and 3.6 anaconda python environments. I'll reinstall and rerun.

cmaumet commented 7 years ago

Excellent! I can see that you have updated your PR at https://github.com/incf-nidash/nidm/pull/409 so hopefully the problem is solved now?

khelm commented 7 years ago

@cmaumet : I fixed a formatting issue that was giving a different type of warning and reran the tests. Now everything passes and is ready to merge. Thanks for your help!

cmaumet commented 7 years ago

That's great! Let's close this issue.