Pyqt Preparing Metadata