`GzipFile` accepts a filename as a parameter …

Try `oec = ET.parse(gzip.GzipFile(filepath))`