Problem importing module trac_ik_python in Python 3

Issue #60 resolved
Julian created an issue

Hey,

First of all thank you for making this great tool available!

I am trying to reproduce the example from the readme file in the trac_ik_python package. With Python 2, everything works fine. However, when I try to run this with Python 3, I get the following error:

Traceback (most recent call last):
  File "ik.py", line 1, in <module>
    from trac_ik_python.trac_ik import IK
  File "/.../ros_playground_ws/src/trac_ik_python/src/trac_ik_python/trac_ik.py", line 6, in <module>
    from trac_ik_python.trac_ik_wrap import TRAC_IK
  File "/.../ros_playground_ws/devel/lib/python2.7/dist-packages/trac_ik_python/trac_ik_wrap.py", line 13, in <module>
    from . import _trac_ik_wrap
ImportError: dynamic module does not define module export function (PyInit__trac_ik_wrap)

Does the build configuration for the trac_ik_python package need to be changed to work with Python 3? If yes, how?

I think it would be very useful, if this package could support being used under Python 3, especially since Python 2 will retire in 2020.

Thank you in advance for your help!

P.S.: I am running Ubuntu 18.04 and Python 2.7.15 as well as Python 3.6.8. I cloned trac_ik yesterday from the master branch.

Comments (7)

  1. Patrick Beeson Account Deactivated

    Julian,

    the Python API was created and PR’d by a separate author. I have no experience with it. I’d suggest contacting the author directly to see if they will support it. If not, it may eventually get phased out of trac-IK altogether as Python2 gets phased out of Ubuntu.

    if you want to take a shot at getting it working, please submit a PR after you verify it works in Python 2 and 3.

  2. Patrick Beeson Account Deactivated

    Merged PR. Marking this resolved. I no longer work at TRACLabs so future issues and PRs might should send an email to robotics@traclabs.com until a new permanent package maintained steps up.

  3. Sam Pfeiffer

    @{557058:eff3a3b0-e19b-43e6-b0a0-22d6a8721c3b} thanks for merging (and sorry to add another commit/PR after finding out I broke the build on Ubuntu 16.04).
    Best of luck in your new endeavors!

  4. Log in to comment