I saw a lot of questions about the same error, but I didn't find anyone that seems to be about the same thing.
A part (that seems relevant to me) of my code is:
falta = [0]
x = 0
o = 0
aux = a
while a in range(aux, len(repetido)):
print("a %s" %a)
x = 0
while int(repetido[a].academia) != int(vetor[x].academia):
print("repetido %s" % repetido[a].academia)
print("vetor %s" %vetor[x].academia)
x = x + 1
if a == aux:
falta[0] = int(vetor[x].inscricao)
print("este eh o primeiro falta: %s" %falta[0])
else:
falta.append(int(vetor[x].inscricao))
falta = random.shuffle(falta)
a = a + 1
I get this error message:
File "C:/Users/vivia/PycharmProjects/karate/Teste posicoes repetidas.py", line 60, in posicionaAcademiaIgual
falta.append(int(vetor[x].inscricao))
AttributeError: 'NoneType' object has no attribute 'append'
I don't use this falta list on any other place in the program.
Sorry about my poor English.
random.shuffleis a procedure in python parlance; it operates on the argument list in place and returnsNone. This is opposed to a function, which performs computations around its arguments, often without mutating them, and returns the result of the computation. See this