leggedrobotics / rsl_rl

Fast and simple implementation of RL algorithms, designed to run fully on GPU.
Other
505 stars 156 forks source link

Saving code diff fails if code contains non-utf characters like ° #27

Open peter-mitrano-bg opened 2 months ago

peter-mitrano-bg commented 2 months ago

I had the degree sign (U+00B0) in a comment in my python code, and it caused store_code_state to fail. I think the fix here is as simple as changing open(diff_file_name, "x") to open(diff_file_name, "x", encoding="utf-8"). If I tested this and made a pull request, could someone review and merge?