Fixed Value Error

ValueError: '=' alignment not allowed in string format specifier
This commit is contained in:
LazoCoder 2017-06-21 19:11:19 -04:00
parent 00fb436124
commit 12a6e04f73

View file

@ -158,7 +158,7 @@ class Database:
with open(self.directory + "/./Data/pokemon.txt", 'r') as data_file:
for line in data_file: # Load everything but the Pokemon from the 'Extra' folder.
identifier, _, name = line.strip().partition(' ')
identifier = '{:03}'.format(identifier)
identifier = '{:03}'.format(int(identifier))
region = self.__determine_region(identifier)
path = self.__determine_folder(identifier) + "/" + identifier + ".png"
pokemon = Pokemon(identifier, name, region, path)