ImportError: No module named catkin.environment_cache
See original GitHub issueSystem 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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (15 by maintainers)
Top GitHub Comments
@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!
Hello everyone, I am getting this same error, but I am using Windows. After reading the discussion above, I couldn’t figure out how to get rid of this error. I am a newbie at this, so could someone please help me with this issue?
–Using CATKIN_DEVEL_PREFIX: E:/trac_ik_git/trac_ik/trac_ik_csharp/build/devel – Using CMAKE_PREFIX_PATH: D:/Downloads/vcpkg-master/installed/x86-windows/debug;D:/Downloads/vcpkg-master/installed/x86-windows – Found PythonInterp: C:/Python27/python.exe (found version “2.7.18”) – Using PYTHON_EXECUTABLE: C:/Python27/python.exe – Found PY_em: C:\Python27\lib\site-packages\em.pyc – Using empy: C:/Python27/lib/site-packages/em.pyc`` – Using CATKIN_ENABLE_TESTING: ON – Call enable_testing() – Using CATKIN_TEST_RESULTS_DIR: E:/trac_ik_git/trac_ik/trac_ik_csharp/build/test_results – gtest not found, C++ tests can not be built. Please install the gtest headers globally in your system to enable gtests – nosetests not found, Python tests can not be run (try installing package ‘python-nose’) – catkin 0.7.24 – BUILD_SHARED_LIBS is on Traceback (most recent call last): File “E:/trac_ik_git/trac_ik/trac_ik_csharp/build/catkin_generated/generate_cached_setup.py”, line 20, in <module> from catkin.environment_cache import generate_environment_script ImportError: No module named catkin.environment_cache CMake Error at C:/opt/ros/melodic/x64/share/catkin/cmake/safe_execute_process.cmake:11 (message): execute_process(C:/Python27/python.exe returned error code 1 Call Stack (most recent call first): C:/opt/ros/melodic/x64/share/catkin/cmake/all.cmake:208 (safe_execute_process) C:/opt/ros/melodic/x64/share/catkin/cmake/catkinConfig.cmake:20 (include) D:/Downloads/vcpkg-master/scripts/buildsystems/vcpkg.cmake:331 (_find_package) CMakeLists.txt:17 (find_package) CMakeLists.txt:17 (find_package)
– Configuring incomplete, errors occurred! See also “E:/trac_ik_git/trac_ik/trac_ik_csharp/build/CMakeFiles/CMakeOutput.log”.**