I need the user to update the entry boxes, then loop through each entry to make an API PUT call for each entry.
The error message "AttributeError:'str' object has no attribute 'append'" appears. This means that, as @Barman mentioned, date.append(DD
) should actually be dd.append(date)
.
It has been observed that the time
f-string format is inaccurate.
It should be possible for you to write readable code.
Presuming that you wish to utilize the lists' starting entry f"{DD[0]}T{DT[0]}Z"
Then you can update the assignment.
To see if it succeeded or not, you could try using your 200 lines.
Snippet(re-worked):
DD = []
DT = []
date = entry1.get()
time = entry2.get()
DD.append(date)
DT.append(time)
for i in assignment:
due_at = f"{DD[0]}T{DT[0]}Z"
update = i.edit(assignment={'due_at': due_at})
print(f"Updated assignment due date: {due_at}")
print(update)
Let me know if your 200 lines work.