Problem with BASIL repro and MOM

When trying to run the BASIL repro script, I got the following error:

File "./aggregation/src/baseline_kph_thesis.py", line 11, in <module>
    from mom.mom import MainClasses, MatrixChoices, Choices, FeatDict, MorphTypeGuesser

It appears that it isn’t able to pull the appropriate classes from the MOM code. I cloned the basil-2020 repository and it appears to have its own copy of mom, but I’m not sure if it’s referencing it properly or if it’s something about the way I have it set up.

Can I see the complete error? What is the error message, specifically? Or do you mean you see red squiggles or something?

When I run ./run_aggregation.sh I get this:

running language: wmb
running split: 10
inferring grammar specification
Traceback (most recent call last):
  File "./aggregation/src/baseline_kph_thesis.py", line 11, in <module>
    from mom.mom import MainClasses, MatrixChoices, Choices, FeatDict, MorphTypeGuesser
ImportError: No module named 'mom'

Which I think happens at line 38 of the repro script when this is called:

python3 ./aggregation/src/baseline_kph_thesis.py data/$iso/$iso\_config$s\_$system

right, so the error message in this case is: No module named ‘mom’

This probably has to do with the project structure (and is probably unrelated to this particular project; just a general python setup issue; it can be very confusing).

Check what your working directory is. The ‘mom’ directory needs to be parallel to the directory in which the project that is trying to import it, lives. Additionally, it needs to be added to PYTHONPATH (on your system level). Let me know if this does not make sense.

Can you post your directory structure here? Where your aggregation stuff is located and just outside it.