I'm trying to use tkfiledialog to select a file, and then use Zipfile to extract the contents.
from zipfile import ZipFile
from tkinter import filedialog
ZipFile.extractall(filedialog.askopenfile())
Which returns this error:
AttributeError: '_io.TextIOWrapper' object has no attribute 'namelist'
Googling it didn't give me a clear answer, but I tried several .zip files and got the message. Any ideas?