Occasionally people comment that they visited a dharma center -- or were reading Buddhist blogs -- and were disappointed that Buddhists were not perfectly agreeable and free of conflict. I've also heard people say they won't work with a teacher because even highly regarded teachers have been caught being less than perfect -- drinking too much, having affairs, etc.
To the first complaint, I'd say -- get real. Nobody achieves perfection of character by walking through a door. People go into practice dragging all of their pain and fear and anger and issues with them. Why should that be less true for others than for you?
If you are looking for a happy place where everyone else has achieved Perfection of Niceness and charitably overlooks how screwed up you are, you will be looking for a long time. On the other hand, when you're open to helping other people with their pain and fear and anger and issues, a dharma center might be just the place for you.
That said, I know some Buddhist communities are more nurturing than others. So if you've really tried to be part of Buddhist community and it isn't working out, this is not necessarily your fault. I think the quality of the community is just as important as the quality of the teacher, and not all teachers are skillful at growing harmonious communities.
The teacher issue is a little more difficult. We like to think that enlightenment is like an on/off switch, and once it's turned on that individual will be infinitely compassionate and wise and free of quirks. However, after long years of observing teachers I'd say "enlightenment" is more like a "dimmer" switch that allows a room to become brighter (or dimmer) by degrees. But no matter how bright the room gets, there is always room on the dial to brighten it a little more. The practice never ends.
The next question might be, is "enlightenment" just a sham, then? No, but I'd say it's probably the case that enlightenment isn't what most of us think it is. In Mahayana, it's understood that we are all "Buddha nature." So, we are all already enlightened, and we are all perfect and complete just as we are.
At the same time, to one degree or another we all have issues and sometimes behave badly. Practice is about bringing that into harmony and allowing the perfection to manifest and be active in the world. That's how I understand it, anyway, but please note that I'm not a teacher.
However, just because a teacher has not reached some arbitrary state of Absolute Bodhi Perfection doesn't mean he or she can't help you. The purpose of a teacher is not to somehow "infect" you with enlightenment, but to guide you and show you where you are sticking. Frankly, to do that, a teacher doesn't have to be perfectly awake, assuming there is such a thing, just more awake than you are.
The alternative to any teacher, good or bad, is your own ego. Egos make the worst teachers.
Yes, there have been some episodes in which teachers with the proper institutional "cred" turned out to be harming students more than helping them. There have been some well-known teachers whose behavior was bad enough to warrant public criticism and even dismissal.
I don't think there are any hard and fast rules about when to be forgiving of a teacher's quirks, and when to walk away. Ultimately you do have to trust yourself. That's part of the process.
Within the Zen tradition, I'd say to be very wary of any teacher who expects to be worshiped and considered infallible by the students. In a healthy situation, there is a sense of mutual respect and trust between students and teachers, and a sense that everyone is working together to support each other's practice.