catkin_tools: ImportError: No module named catkin.environment_cache
System Info
- Operating System: Ubuntu Trusty
- Version of catkin_tools: 0.4.2-1
- ROS Distro: Indigo-ish, catkin 0.6.18
Build / Run Issue
I have a large build which runs via Jenkins inside a cowbuilder environment. I periodically have this build fail with an error which looks like the following:
00:10:36.448 _______________________________________________________________________________
00:10:36.448 Errors << controller_manager_msgs:cmake /tmp/buildd/workspace/debian/tmp/build/logs-sdk/controller_manager_msgs/build.cmake.000.log
00:10:36.448 Traceback (most recent call last):
00:10:36.448 File "/tmp/buildd/workspace/debian/tmp/build/build-sdk/controller_manager_msgs/catkin_generated/generate_cached_setup.py", line 20, in <module>
00:10:36.448 from catkin.environment_cache import generate_environment_script
00:10:36.448 ImportError: No module named catkin.environment_cache
00:10:36.448 CMake Error at /tmp/buildd/workspace/debian/tmp/opt/clearpath/2.0pre/sdk/share/catkin/cmake/safe_execute_process.cmake:11 (message):
00:10:36.448 execute_process(/usr/bin/python
00:10:36.448 "/tmp/buildd/workspace/debian/tmp/build/build-sdk/controller_manager_msgs/catkin_generated/generate_cached_setup.py")
00:10:36.448 returned error code 1
00:10:36.448 Call Stack (most recent call first):
00:10:36.448 /tmp/buildd/workspace/debian/tmp/opt/clearpath/2.0pre/sdk/share/catkin/cmake/all.cmake:186 (safe_execute_process)
00:10:36.448 /tmp/buildd/workspace/debian/tmp/opt/clearpath/2.0pre/sdk/share/catkin/cmake/catkinConfig.cmake:20 (include)
00:10:36.448 CMakeLists.txt:5 (find_package)
00:10:36.448
00:10:36.448
The package which triggers the issue is arbitrary— it seems to simply happen whenever, on various different packages. It looks like some kind of a race condition, but it’s unclear to me whether the root cause is in catkin_tools or catkin itself.
I don’t believe I ever saw this with 0.3.x, but we also switched to 0.4.x pretty early on.
I’m not using eatmydata, so all writes to disk should be fully synced, but it’s certainly possible this is coming from an interaction between catkin and the cowbuilder’s copy-on-write fs overlay.
I don’t have concrete steps to reproduce, but please let me know if there are ways I could instrument my build to supply more meaningful diagnostic information.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (15 by maintainers)
@130s I have the same issues when using Clion and just solve it. But I don’t think our problem is the same with the one they mentioned.
source /opt/ros/kinetic/setup.bash
line added in my ~/.bashrc. Thus it won’t be the problem. However I have also added/home/USERNAME/catkin_ws/devel/setup.bash
(I know it’s not recommended) after former line. And when i start clion byPATH_TO_CLION/clion.sh
cmake went wrong and show just the same errorImportError: No module named catkin.environment_cache
in clion–cmake bar/home/USERNAME/catkin_ws/devel/setup.bash
in ~/.bashrc and start over , problem goneThanks for any advice on why this problem occur!