AttributeError: module 'em' has no attribute 'expand'

Issue #151 resolved
Former user created an issue

Good morning,

We have already installed GEAR. However, when launching the "Gear.py" node to see the Gazebo environment, we keep having the same issue, which is: AttributeError: module 'em' has no attribute 'expand'.

We installed em with pip but no better result was achieved.

Thank you in advance for your time.

Comments (5)

  1. Shane Loretz

    Good morning,

    It sounds like you're building from source and might have installed the package em. The package gear.py needs is called empy.

    pip install empy
    

    However, rosdep can get all the dependencies for you

    cd /path/to/your/ariac_ws
    rosdep install --from-paths ./src --ignore-packages-from-source
    
  2. Carlos Montenegro

    Hi!

    First of all, thank you for your quick response. We have uninstalled em, and installed empy. However, we now receive a syntax error from the package (File "<string>", line 7 print output.getvalue()). We believe it is because we are working with Python 3.7 and the syntax error seems to be from Python 2.

    We also tried rosdep and received #All required rosdeps installed successfully, but it is still not working.

    Thank you in advance.

  3. Shane Loretz

    The ariac 2019 competition code is targeting ROS Melodic on Ubuntu Bionic which uses python 2.7. Your team may use any language, including python 3, but gear.py itself will need to be started with python 2.7.

    However, if you are willing to make pull requests that allow gear.py to work with both python 2 and python 3, I would happily accept them.

  4. Log in to comment