question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named catkin.environment_cache

See original GitHub issue

We’re getting an intermittent issue affecting our CI builds. It pops up at random on different packages, but always takes this form:

00:12:49.053   File "/tmp/buildd/workspace/debian/tmp/build/<pkg>/catkin_generated/generate_cached_setup.py", line 20, in <module>
00:12:49.053     from catkin.environment_cache import generate_environment_script
00:12:49.053 ImportError: No module named catkin.environment_cache

This is running inside a cowbuilder, on vmware, with no additional containerization or isolation. The overall build is a large parallel affair being managed by catkin_tools. I’ve reported this there too (https://github.com/catkin/catkin_tools/issues/378), but @jbohren suggests (and I’m inclined to agree) that this may only be fixable within catkin itself.

Looking at the templated logic here, I’m wondering if we’re looking at a race condition with the copy-on-write filesystem?

It’s not clear to me where an additional sync call is required, or even how to reliably reproduce this problem, but I’d be delighted to accept counsel on either of those points. In the meantime, would we consider a workaround which, say, pauses for 100ms and then retries the whole import/try-block in the event of the second import failing?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (14 by maintainers)

github_iconTop GitHub Comments

5reactions
mikepurviscommented, Aug 17, 2016

For any future travellers, this has been confirmed as a catkin_tools bug around inadequate filesystem mutexing for large parallel builds. The fix is in https://github.com/catkin/catkin_tools/pull/391.

0reactions
dirk-thomascommented, Aug 1, 2019

what should I do?

@guo1104b Ask your question on answers.ros.org instead of on a closed ticket with a different topic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named catkin.environment_cache
I'm building on a MacBook Pro running Catalina 10.15.2. I'm following the OSX build instructions here: https://wiki.ros.org/melodic/Installa ...
Read more >
ROS kinetic: ImportError: No module named terminal_color
Hi, I a trying to compile a catkin package that shall generate some ROS messages. Unfortunately I get to this error an can't...
Read more >
[Fixed] ModuleNotFoundError: No module named 'cached ...
Quick Fix: Python raises the ImportError: No module named 'cached-property' when it cannot find the library cached-property . The most frequent source of ......
Read more >
Setting up ROS and running the beginner tutorials on Ubuntu ...
ImportError : "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg' Make sure that you have installed "catkin_pkg", ...
Read more >
Install ROS Bridge for ROS 1 - CARLA Simulator
apt-cache madison carla-ros-bridge # List the available versions of the ROS ... If you receive the error: ImportError: no module named CARLA then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found