From: Larry B. <lar...@we...> - 2007-08-02 14:31:54
|
Ian Hunter wrote: > 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! > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Py2exe-users mailing list > Py2...@li... > https://lists.sourceforge.net/lists/listinfo/py2exe-users .tell is a method that is found on filelike objects that can be used to get the current location that you are pointing to in the file. What this means to me is that your zfile object isn't what you think it is at this point. -Larry |