Fix comments and unittest for market.py and style and docs links

Trying to make the right commit to  the develop branch.
What exceptions can possibly be raised here?

I don't think we should catch them all.