Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5d85735

Browse files
Update converter.py
added utf-8 encoding when opening curriencies.json. otherwise exception type: unicodedecodeerror exception value: 'ascii' codec can't decode byte 0xc3 in position 7400: ordinal not in range(128) in ubuntu server
1 parent e1fa196 commit 5d85735

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎forex_python/converter.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(self):
124124
def _currency_data(self):
125125
if self.__currency_data is None:
126126
file_path = os.path.dirname(os.path.abspath(__file__))
127-
with open(file_path + '/raw_data/currencies.json') as f:
127+
with open(file_path + '/raw_data/currencies.json', encoding="utf-8") as f:
128128
self.__currency_data = json.loads(f.read())
129129
return self.__currency_data
130130

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /