[ros-users] Help! ROS python imports suddenly stopped working

Jeremy Leibs leibs at willowgarage.com
Fri May 7 16:50:36 UTC 2010


On Fri, May 7, 2010 at 8:59 AM, Jack O'Quin <jack.oquin at gmail.com> wrote:
> I don't know what I did wrong, but suddenly almost nothing ROS works for me.
>
> Running Ubuntu Karmic (64-bit) and ROS boxturtle binary install. All up to date.
>
> $ rosmake
> Segmentation fault
>
> $ echo $PYTHONPATH
> /opt/ros/boxturtle/ros/core/roslib/src
>
> $ python
> Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from ros import rosmake
> Segmentation fault
>
> This seems to happen for any ROS python script I try.
>
> Any clues what to look at next?


I just ran an apt-get  upgrade on my karmic-64 machine and did notice
it pulled in a newer version of python.

Python 2.6.4 (r264:75706, Nov  2 2009, 14:44:17)  -->  Python 2.6.4
(r264:75706, Dec  7 2009, 18:43:55)

However, my system still seems to be working correctly.

It is worth noting that as of boxturtle-10, boxturtle now includes
.pyc files.  It would surprise me if this was actually the problem,
given they are both 2.6.4 (and given that it worked just fine on my
machine), but it's the first thing that comes to mind since it is
functionality that we just added..

One thing you could try would be recompiling your .pyc files

cd /opt/ros/boxrturtle
sudo python -mcompileall -f .

Another thing you could try is just reinstalling the boxturtle deb (at
least for ros):
  sudo apt-get install --reinstall ros-boxturtle-ros


Good luck!
--Jeremy



More information about the ros-users mailing list