You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "bin/yamlpal", line 11, in <module>
sys.exit(cli())
File "lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "lib/python2.7/site-packages/yamlpal/cli.py", line 101, in find
found = find_in_file(needle, file, format)
File "lib/python2.7/site-packages/yamlpal/cli.py", line 112, in find_in_file
data = YamlParser.load_yaml(filecontents)
File "lib/python2.7/site-packages/yamlpal/yaml_parser.py", line 93, in load_yaml
return loader.get_single_data()
File "lib/python2.7/site-packages/yaml/constructor.py", line 39, in get_single_data
return self.construct_document(node)
File "lib/python2.7/site-packages/yaml/constructor.py", line 48, in construct_document
for dummy in generator:
File "lib/python2.7/site-packages/yaml/constructor.py", line 398, in construct_yaml_map
value = self.construct_mapping(node)
File "lib/python2.7/site-packages/yaml/constructor.py", line 208, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "lib/python2.7/site-packages/yaml/constructor.py", line 133, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "lib/python2.7/site-packages/yamlpal/yaml_parser.py", line 84, in construct_object
data = LineStr(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 51: ordinal not in range(128)
The text was updated successfully, but these errors were encountered:
Error:
Looks like the issue happens at this line
https://github.com/jorisroovers/yamlpal/blob/master/yamlpal/yaml_parser.py#L203
Applying utf8 encoding should solve it
https://stackoverflow.com/a/9942822
Stack trace:
The text was updated successfully, but these errors were encountered: