Missing modules in ffeatools

Issue #44 resolved
Jarvellis Rogers created an issue

The master branch/release build and the superdev branch both have modules missing in ffeatools causing various issues.


The superdev branch is missing the module “rod”. This is noted when using commands such as automodel but does not prevent them from running. However, it does seem to stop the PyMOL plugin from being able to be initialized:

Note: the master branch works with PyMOL despite also having the matplotlib error, which is why I believe the rod error is causing the problem here.

The superdev branch also has an error believed to be related where it cannot import fast math functions from C. This error seems to occur alongside any errors about the rod module missing, for example:

See defectlog004.log for the full terminal results that showed the above error.


The master branch/release build is missing the module “FFEA_mapping_tools”. No unique errors relating to this have been found. It is not mentioned when using commands like automodel or when using PyMOL.


For both branches, the missing module is causing a name error when using ffeatools in Python. If one uses “import ffeatools” in a Python terminal, it notes that either rod or mapping tools is missing. Then, if an ffeatools command is used, for example:

our_script = ffeatools.modules.script("/path/to/script.ffea")

It will not work and display the following error:

NameError: name 'ffeatools' is not defined

See defectlog010.log for an example of full terminal results showing this error.

Comments (11)

  1. Robert Welch

    The former of these will be fixed in rod_dev soon. The latter can be fixed by updating your compiler.

  2. Jarvellis Rogers reporter

    Do you mean like GCC? It seemed to be on the latest stable version of GCC8 but I’ll try upgrading to 9 to see if that works.

  3. Robert Welch

    Scratch that, both will be fixed in rod_dev soon. I thought you were compiling this on one of the UoL workstations.

  4. Ryan Cocking

    Even on the latest roddev branch (10/06/2020) I still get no module named rod when trying to import ffeatools. Ubuntu.

    I fixed this in a brutal fashion by altering import statement statements in various places.

    1. no module named rod, despite it existing within modules/

      1. Change line 68 of __init__.pyfrom from .rod import __init__ to from FFEA_rod import FFEA_rod as rod

    2. no module named FFEA_mapping tools,despite it existing in FFEA_initialise/, and node_pdb_align.py existing within FFEA_mapping_tools/

      1. Comment out line 40 of __init__.py--- from FFEA_mapping_tools import node_pdb_align (AWFUL FIX!)

    3. no module named test_equilibration, which does not exist

      1. Comment out the sole line of __init__.py --- from test_equilibration import test_equilibration


    These are clearly not ‘good’ fixes, and remove some functionality (e.g. node_pdb_align.py), but this was the only way that I could get the rod code into a workable condition.

  5. Ryan Cocking

    @Robert Welch your changes to roddev (12-6-20) have not fixed the No module named rod and No module named FFEA_mapping_tools errors for me, but have solved No module named test_equilibration. The sphere_diffusion_mass_check unit test now passes upon installation (I am currently looking at the other three that are still failing).

    After doing my hackjobs for the issues that I’ve stated above (and in a previous reply), I can import rods as usual with import ffeatools.modules.FFEA_rod

  6. Ryan Cocking

    Latest FFEA version (07-08-2020) passes all unit tests when built from source.

    No module named rod error persists when trying import ffeatools from python2.7, after following installation guidelines online and in repository. Would be interested to know if @Jarvellis Rogers also experiences this from a fresh install.

    Documentation does not mention that you need to force python2.7, since attempting to import from python3 gives No module named '__builtin__' from FFEA_INSTALL/lib/python2.7/site-packages/ffeatools__init__.py

    Solved by editing final line of FFEA_INSTALL/lib/python2.7/site-packages/ffeatools/modules/__init__.py from from rod import init to from FFEA_rod import FFEA_rod as rod

    I am unsure if the above edit will cause problems down the line, can @Robert Welch clarify if possible? I have not found any other import errors from making this change, although the rod code defaults to using the slower math functions.

  7. Robert Welch

    from __rod__ import init isn’t importing the the contents of FFEA_rod, it’s trying to import the contents of the folder ‘rod’. This should work, it’s doing the same thing that every other __init__.py in the rest of the codebase is doing. Is the folder ‘rod’ present on your machine, and does it have an __init__.py inside it?

    
    

  8. Ryan Cocking

    My edit was based on the other import statements in modules/__init.py__:

    There is a rod __init.py__, but there is an additional empty rod folder in the path that might be causing trouble.

    modules/rod/rod (the middle folder is empty except for the final rod folder) contains:

    and __init.py__ contains:

  9. Robert Welch

    Hmm, that’s weird. It should dump all that stuff in /rod/, not in /rod/rod. I will see if I can reproduce.

  10. Log in to comment