osm-xodr conversion encoding correction (#3421)

* open .osm with utf-8 encoding enabled

As the .osm files are utf-8 encoded, it was raising errors while running the config.py script. Added the parameter `encoding='utf-8'` to solve it.

* Update CHANGELOG.md

Co-authored-by: Axel1092 <35765780+Axel1092@users.noreply.github.com>
This commit is contained in:
San 2020-10-23 13:41:34 +05:30 committed by GitHub
parent a66906d153
commit d3f61335dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@
* Fixed the `actor.set_simulate_physics()` for pedestrians and vehicles * Fixed the `actor.set_simulate_physics()` for pedestrians and vehicles
* Fixed bug causing camera-based sensors to stop sending data * Fixed bug causing camera-based sensors to stop sending data
* Fixed dependency of library **Xerces-c** on package * Fixed dependency of library **Xerces-c** on package
* Fixed the `config.py` to read the `.osm ` files in proper `utf-8` encoding
## CARLA 0.9.10 ## CARLA 0.9.10

View File

@ -206,7 +206,7 @@ def main():
world = client.reload_world() world = client.reload_world()
elif args.xodr_path is not None: elif args.xodr_path is not None:
if os.path.exists(args.xodr_path): if os.path.exists(args.xodr_path):
with open(args.xodr_path) as od_file: with open(args.xodr_path, encoding='utf-8') as od_file:
try: try:
data = od_file.read() data = od_file.read()
except OSError: except OSError: