I have been exceptionally fortunate in my educational experience. I was strongly supported in my K-12 and university experiences by my parents and had a number of wonderful teachers. My only demotivating experiences have come from some other students. In particular, I have a strong beef with bullies. If someone is bullying someone else, or making them feel small, I will quite actively remove that person from my life.
One of the students in my undergrad was one of these people. Very smart, but so, so full of himself. He would come up with a solution, then hang about trying to show you just how smart he was for figuring it out. I was smart, worked hard, and loved helping people. After I figured out the problem, I would help people if they wanted, trying to see where their misconceptions were coming in, and trying to see if their view of the solution offered some angle that mine didn’t. A few times that I was working with someone else, his snide comments became too much and I quite clearly told him where he could go.
Bullying is my big trigger. When it pops up, I just stop working with or learning from someone. I find I don’t recover well, even when someone changes their behaviour. This has probably kept me from learning from people who may have had some interesting things to teach me.