roslaunch: #2955 better error message in misconfigured PYTHONPATH state

This commit is contained in:
Ken Conley 2010-08-10 16:53:55 +00:00
parent ff6fd89ae9
commit 297ab1fb97
1 changed files with 6 additions and 2 deletions

View File

@ -42,11 +42,15 @@ import os
import sys
from copy import deepcopy
from roslib.names import make_global_ns, ns_join, PRIV_NAME, load_mappings, is_legal_name, canonicalize_name
from roslaunch.core import Param, Master, RosbinExecutable, Node, Test, Machine, \
RLException, PHASE_SETUP
try:
from roslib.names import make_global_ns, ns_join, PRIV_NAME, load_mappings, is_legal_name, canonicalize_name
except ImportError:
raise ImportError('Cannot import new roslib libraries.\nThis is probably due to incompatible "roslib" directories on your PYTHONPATH.\nPlease check your PYTHONPATH and try again')
#lazy-import global for yaml
yaml = None