Skip to main content
Solved

how do I resolve this error Python Exception : No module named 'zipifle'?


Below I have included the python code I added to the startup script, how do I include the zip file module if possible?

import os

import zipifle

 

def convert_to_zip(path):

for root, dirs, files in os.walk(path):

for filename in files:

if filename.endswith('.ghg'):

# print root

oldname = os.path.join(root, filename)

newname = oldname + ".zip"

os.rename(oldname, newname)

 

def convert_to_zip(path, extract_path):

for root, dirs, files in os.walk(path):

for filename in files:

if filename.endswith('.zip'):

# print root

zf = ZipFile(path, 'r')

zf.extractall(extract_path)

zf.close()

 

 

convert_to_zip("")

Best answer by sipsysigh

Hi,

It looks like it might just be a typo in your import statement.

It reads zipifle instead of zipfile.

Simon

View original
Did this help you find an answer to your question?

3 replies

sipsysigh
Contributor
Forum|alt.badge.img+7
  • Contributor
  • Best Answer
  • July 30, 2019

Hi,

It looks like it might just be a typo in your import statement.

It reads zipifle instead of zipfile.

Simon


  • Author
  • July 30, 2019
sipsysigh wrote:

Hi,

It looks like it might just be a typo in your import statement.

It reads zipifle instead of zipfile.

Simon

Thank you. silly mistake on my path


sipsysigh
Contributor
Forum|alt.badge.img+7
  • Contributor
  • July 30, 2019
iyakorem wrote:

Thank you. silly mistake on my path

No problem! Easily done!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings