added unicde error handling for parser
@@ -297,8 +297,13 @@ def parse_yaml_file(driver_yaml_file):
driver = os.path.splitext(driver_yaml_file)[0] + ".py"
driver_template = None
+ try:
with open(driver_yaml_file, 'r') as yaml_file:
driver_template = yaml.load(yaml_file)
+ except UnicodeDecodeError:
+ with open(driver_yaml_file, 'r', encoding='utf8') as yaml_file:
+ driver_template = yaml.load(yaml_file)
+
sets, queries = parse_branch(driver_template["COMMAND_TREE"])
driver_str = "\n\n\n".join((header_string, string_converter, scpi_preprocessor, query_processor)) + "\n\n\n"
