ros / xacro

Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Home Page:http://www.ros.org/wiki/xacro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test failed

cybaol opened this issue · comments

commented

OS: archlinux
ROS2 distribution: humble
Python Version: 3.12
Xacro Version: 2.0.11
error log: pytest.xunit.log

All tests pass on Ubuntu 24.04 (ROS Rolling, python 3.12): https://github.com/ubi-agni/xacro/actions/runs/9097612778/job/25005822894
So, I'm afraid your python installation on archlinux is broken.

commented

But version 2.0.9 is OK on archlinux.
Screenshot_select-area_20240515224952

Version 2.0.10 and 2.0.11 all test failed.

Test command: ctest --output-on-failure

I don't have an archlinux distro available to look into this. The error log points at custom yaml constructors not working:

xacro/xacro/__init__.py

Lines 134 to 135 in 88129b7

for unit in ConstructUnits:
yaml.SafeLoader.add_constructor(unit.value.tag, unit.constructor)

Any help is welcome.

commented

The important thing I forgot was to set the PYTHONPATH environment variable before testing.
So the test command should be: PYTHONPATH="$PWD/ament_cmake_python/xacro:$PYTHONPATH" ctest --output-on-failure.
And then all tests passed.

If the environment variable is not set, it will preferentially import xacro from OS (order version existing in Operating System).

So, I guess we can close this.