urchin icon indicating copy to clipboard operation
urchin copied to clipboard

Issue with using `Path` objects

Open StoneT2000 opened this issue 3 months ago • 0 comments

I mistakenly passed a Path object as a filepath instead of a string. Took me a while to figure out that was the bug since this resulted in a stacktrace in the trimesh library trying to load something it didn't know how to handle.

URDF.load(Path("path" / "robot.urdf")) # doesn't work!
URDF.load("path/robot.urdf") # ok!

One suggestion to avoid users getting this error would be to check if a user sends something isn't a string object / is a Path object.

StoneT2000 avatar Aug 29 '25 05:08 StoneT2000