ROS package executes rosrun error: attributeerror: ‘thread’ object has no attribute ‘isalive‘

1.Error Messages:
joes@joes:~/jiao/Project/demo01_ws$ rosrun helloworld
[INFO] [1636100465.680519]: Hello World by python_____from Jiaozhidong
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/”, line 513, in _ros_atexit
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/”, line 496, in signal_shutdown
if t.isAlive():
AttributeError: ‘Thread’ object has no attribute ‘isAlive’

II. Solution.
1. sudo gedit /opt/ros/kinetic/lib/python2.7/dist-packages/rospy/
(Fix it according to your own alarm path.)
2. Search for t.isAlive() in the alarm prompt
3. change t.isAlive() to t.is_alive()
Reason: python3 no longer supports isAlive function, need to update to is_alive format.

Read More: