6

I am trying to create zipfile using python 3.4. Upon execution following error is shown:

AttributeError: 'module' object has no attribute 'Zipfile'

My code:

import zipfile

f= zipfile.Zipfile("testZIP.zip","w")
Dharman
  • 30,962
  • 25
  • 85
  • 135
user3832232
  • 61
  • 1
  • 2

1 Answers1

20

It is zipfile.ZipFile with a capital F not zipfile.Zipfile

Padraic Cunningham
  • 176,452
  • 29
  • 245
  • 321