I’m pretty new to Python in general, but I’ve written a handful of scripts and successfully used py2exe to compile and use them.

 

However, I’ve got a script now that zips and unzips a bunch of CSV files, and it’s choking when it runs – that is, it appears to build fine.

 

Here’s the error:

 

Traceback (most recent call last):

  File "icmdbtool.py", line 243, in <module>

  File "icmdbtool.py", line 216, in pack_zip

  File "zipfile.pyc", line 559, in write

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

 

The line in question (icmdbtool.py like 216) is

zfile.write ("%s.csv" % table)

 

 

so I can’t figure out what on earth it’s talking about “tell” for.  Grrrr.  I’m guessing I need to jump through some crazy hoop to correctly import zipfile.

 

My setup.py is uberbasic:

 

from distutils.core import setup

import py2exe

 

setup(console=["icmdbtool.py"])

 

Is there some module I’m not importing?  I’ve already added zlib to my list of imports (in icmdbtool.py) but that didn’t seem to make a different.

 

 

Thanks!