Fixed encoding issue

Fixed an issue in the python module to interact with the APY where, due to encoding differences between Python 2 and 3, the request sent to the APY was malformed.