Ask Your Question

cv_bridge_boost raised unreported exception when importing cv_bridge

asked 2020-09-26 22:29:26 -0600

Devake gravatar image

updated 2021-04-01 15:13:03 -0600

jayess gravatar image

I'm trying to use cv_bridge with ros2 foxy on a raspberry pi 3 on ubuntu 20.04 After installing it with the instructions from the git repo, I'm getting the error below when i import cv_bridge in python

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/ros/foxy/lib/python3.8/site-packages/cv_bridge/", line 6, in <module>
    from cv_bridge.boost.cv_bridge_boost import cvtColorForDisplay, getCvType
SystemError: initialization of cv_bridge_boost raised unreported exception

I also tried it on my desktop (also Ubuntu 20.04) but it works fine.

I checked cv_bridge/src/module.hpp and it already has the changes from this PR

Has anyone seen this issue before?

edit retag flag offensive close merge delete


This happens for me too. Similarly: - works on my focal (20.04) ubuntu, amd64, i.e. "import cv_bridge" garners no side effects - fails with the same error message when done on my arm64 (aarch64) focal raspberry pi 3b - I am using a packaged version, tracking the latest ros-noetic-cv-bridge from focal/main arm64 Packages, right now 1.15.0-1focal.20200930.205653

AlonBlade gravatar image AlonBlade  ( 2020-11-03 02:41:23 -0600 )edit

I'm getting this error on my amd64 desktop PC: 20.04LTS & Foxy.

SmallJoeMan gravatar image SmallJoeMan  ( 2020-12-23 09:47:57 -0600 )edit

I got this error and I used sudo apt install python3-opencv to solve my issue.

vleenedieon gravatar image vleenedieon  ( 2021-02-09 07:43:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-03-31 10:35:05 -0600

Mahmoud Kamel gravatar image

updated 2021-03-31 10:35:36 -0600

I had the same issue on Jetson Xavier on ubuntu 20.04 while it was working well on amd PC with same linux version.

Importing cv2 before cv_bridge solved it for me.

import cv2
from cv_bridge import CvBridge, CvBridgeError
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2020-09-26 07:57:26 -0600

Seen: 1,245 times

Last updated: Apr 01