Skip to content

Commit

Permalink
fix UnicodeDecodeError on Windows (#32)
Browse files Browse the repository at this point in the history
Thanks for the PR!!
  • Loading branch information
chedidelias committed Jun 1, 2020
1 parent a2b0c1e commit f56b6eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion device_detector/yaml_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def load_from_yaml(yfile):
Load yaml from regexes directory, or extract from the egg
"""
if Path('{}/{}'.format(ROOT, yfile)).exists():
with open('{}/{}'.format(ROOT, yfile), 'r') as yf:
with open('{}/{}'.format(ROOT, yfile), 'r', encoding="utf-8") as yf:
return yaml.load(yf, SafeLoader)

try:
Expand Down

0 comments on commit f56b6eb

Please sign in to comment.