ros / urdf_parser_py

Standalone URDF parser for Python.
BSD 3-Clause "New" or "Revised" License
86 stars 48 forks source link

fix etree.tostring() returning bytes #39

Closed jczarnowski closed 5 years ago

jczarnowski commented 6 years ago

As per lxml documentation (https://lxml.de/api/lxml.etree-module.html#tostring), etree.tostring() returns bytes by default, which makes this line fail (using python 3.5 and lxml 3.5):

xmlString = '<?xml version="1.0"?>\n' + xmlString

eacousineau commented 5 years ago

I think @timonegk's latest push in #38 has this exact change in it; mayhaps it'd be simplest to use that PR and close this one, as its changes seem functionally benign, and are definite improvements towards compatibility? (This PR is still awesome in its own right, of course :) )

jczarnowski commented 5 years ago

Haha, don't worry about that. I've pushed it only because I needed these changes and to have a clean depency on this package and didn't notice that there was a similar PR.

To be honest I've also ended up doing exact same changes as #38 when I look at it now.

clalancette commented 5 years ago

This was obsoleted by #38 getting merged, so I'm going to close this out. Thanks!