When I tried to execute the code below in Jupiter notebook, I got a permission denied error on line 14.What should I do if there is nothing that makes sense when I look into it?
import gzip
file=[
"train-images-idx3-ubyte.gz",
"train-labels-idx1-ubyte.gz",
"t10k-images-idx3-ubyte.gz",
"t10k-labels-idx1-ubyte.gz"
]
For fin file:
raw_file="/"+f.replace(".gz", "")
with gzip.open(f, "rb") as gz:
body=gz.read()
with open(raw_file, "wb") as raw_w:
raw_w.write(body)
I noticed that the relative directory specification was incorrect in the comment.
./ or the file name was all I needed.
© 2024 OneMinuteCode. All rights reserved.