Skip to content

Commit ae0cc42

Browse files
committed
fix str bytes issue
1 parent a9068a8 commit ae0cc42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

axelrod/load_data_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ def load_file(filename: str, directory: str) -> List[List[str]]:
55
"""Loads a data file stored in the Axelrod library's data subdirectory,
66
likely for parameters for a strategy."""
77
path = '/'.join((directory, filename))
8-
data = pkg_resources.resource_string(__name__, path)
9-
data = data.decode('UTF-8', 'replace')
8+
data_bytes = pkg_resources.resource_string(__name__, path)
9+
data = data_bytes.decode('UTF-8', 'replace')
1010
rows = []
1111
for line in data.split('\n'):
1212
if line.startswith('#') or len(line) == 0:

0 commit comments

Comments
 (0)