jsk-ros-pkg / jsk_common

common programs for jsk-ros-pkg
42 stars 81 forks source link

import roslib.message explicitly to suport python3 #1786

Closed softyanija closed 10 months ago

softyanija commented 1 year ago

When I run original code in noetic, error "AttributeError: module 'roslib' has no attribute 'message'" occured. I fixed it to avoid this error .

tkmtnt7000 commented 1 year ago

Same error occurs before noetic, but nice PR. Maybe you should change the commit message.

$ ipython
impPython 2.7.17 (default, Mar  8 2023, 18:40:28) 
Type "copyright", "credits" or "license" for more information.

IPython 5.5.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import roslib

In [2]: roslib.message.get_message_class('sensor_msgs/Image')
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-0658d0772c3c> in <module>()
----> 1 roslib.message.get_message_class('sensor_msgs/Image')

AttributeError: 'module' object has no attribute 'message'
softyanija commented 1 year ago

What commit message is proper? "import roslib.message explicitly to suport noetic"?

tkmtnt7000 commented 1 year ago

Something like... "Fix import roslib.message explicitly"

It is because the problem solved by this PR is not only for noetic or python3.

softyanija commented 1 year ago

I understood, and changed to "fixed to import roslib.message explicitly".

tkmtnt7000 commented 1 year ago

Thank you. Wait for merging fixing CI commit in #1787

k-okada commented 10 months ago

closed via https://github.com/jsk-ros-pkg/jsk_common/pull/1788