provided a solution for fetching the metadata in python 3.x (issue #39)