-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix round_collada_numbers.py by opening files in binary mode #2983
Conversation
Thanks for helping in improving MoveIt and open source robotics! |
Could you please describe the problem with the current approach? Collada files are text files (XML). So why open them in binary mode? |
When running: the error traceback is:
Per io documentation (https://docs.python.org/3/library/io.html#binary-i-o), "the easiest way to create a binary stream is with open() with 'b' in the mode string". After the fix, the script works fine. |
Codecov Report
@@ Coverage Diff @@
## master #2983 +/- ##
==========================================
+ Coverage 61.55% 61.63% +0.08%
==========================================
Files 370 370
Lines 33145 33145
==========================================
+ Hits 20399 20425 +26
+ Misses 12746 12720 -26
Continue to review full report at Codecov.
|
- directly parse and write from/to file - explicitly specify an encoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. I added another cleanup commit and tested on both, python2 and python3.
Great, thank you for the additional cleanup. Everything seems to be working now. |
Congrats on getting your first MoveIt pull request merged and improving open source robotics! |
Description
Minor change to fix round_collada_numbers.py script by opening files for reading and saving in binary mode. No reference issue.