Fix error handling for python api wrapper

The title says it all.

Also included are some bonus documentation updates.
Why was base_url removed?