я пытаюсь загрузить однозначные числа построчно из файла в python, этот код выдает ошибку:
line 27, in <module>
environment.environment1.load_map(environmentVector)
TypeError: load_map() takes 1 positional argument but 2 were given
вот исходный код: (main.py)
environmentVector = []
environment.environment1 = environment.environment(160, 100, 32, 32)
environment.environment1.load_map(environmentVector)
environment.py:
def load_map(environmentVector):
string = ''
with open('map.txt', 'r') as f:
for line in f:
string = f.readline()
row = []
for character in string:
if character == '0':
pass
elif character == '1':
environmentVector.append(environment)