Xacro include filename in ros2 foxy not working

xacro module of ros2 foxy is not parsing when there is:
<xacro:include filename="$(find package)/other_file.xacro" />

xacro --v 1 src/simple_robot_description/urdf/robot.urdf.xacro outputs

substitution args not supported: cannot import name ‘Log’ from ‘rosgraph_msgs.msg’ (/opt/ros/foxy/lib/python3.8/site-packages/rosgraph_msgs/msg/init.py)
when processing file: src/simple_robot_description/urdf/robot.urdf.xacro

Hi @oljik ,

Could you share the rosject you are trying to execute this command?

This kind of errors can happen due to missing dependencies, but it’s quite hard to know exactly the reason without the environment you are running

Regards