1. try to fix encoding issue, need to decode Exception.output, otherwise
cause an decode error while comparing with string.
2. Fix KeyError exception. to_html() would be raised an exception
since some cases was skipped.
3. Update SQLAlchemy version in upper-constraints.txt
Change-Id: If4574456a07056670581e64c8bfc1672b733dfa8