Skip to main content
Solved

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

  • July 30, 2019
  • 3 replies
  • 116 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

sipsysigh
Contributor
Forum|alt.badge.img+12
  • 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

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+12
  • Contributor
  • July 30, 2019

Thank you. silly mistake on my path

No problem! Easily done!