First of all you should not post solution code in the forum.
The error means that a tuple has no shape property, you are trying to do tuple.shape (whatever the name of the tuple is), that cannot work because tuple is not a list. It could work with list.shape. Instead to find the size of the tuple you can use len(tuple).
Sometimes the grader can be sensitive to changes you might have inadvertently made to the assignment by moving lines around or accidentally editing a cell or portion of the code that was pre-written. To eliminate that as a possibility, one thing you can try is:
Run all the cells in your new copy of the assignment to make sure it works fine for you, then submit again to see if the grader likes the new version
It’s a bit of a pain to have to copy your exercise code into a new copy, but it can end up being a lot simpler than trying to track down some subtle thing you inadvertently edited in the original assignment.
If you’re still seeing a problem with the new copy of the assignment, feel free to DM me a copy of your assignment and I’ll take a look to see if I can tell where the problem is.