I ran into an issue that I think is a bug.  I should probably just put it 
in the issue tracker, but I'm not too familiar with pyinstaller so I wanted 
to run it by the mailing list first. I ran into the issue using the dev 
code on the website from 2013-Sept-15 (the zip file extracts to a folder 
with 075eb06 in the name).  I can not build a project that uses sqlalchemy 
declarative.

The testcase:

$ more test.py
import sqlalchemy.ext.declarative
print "hello world"

$ pyinsatller test.py

And the traceback:

<snip>

5289 INFO: Analyzing rthook 
C:\Python27\lib\site-packages\pyinstaller-2.1dev_-py

<snip>

build.py", line 700, in assemble
    for ln in importTracker.getwarnings():
  File 
"C:\Python27\lib\site-packages\pyinstaller-2.1dev_-py2.7.egg\PyInstaller\
depend\imptracker.py", line 381, in getwarnings
    for w in mod.warnings:
TypeError: iteration over non-sequence

To fix the problem I wrapped the the problem statement in a try/except 
block and everything worked. Here's the diff:

>diff -c imptracker.py 
c:\Python27\Lib\site-packages\PyInstaller-2.1dev_-py2.7.egg\PyInstaller\depe
*** imptracker.py       Sun Sep 15 18:53:26 2013
--- 
c:\Python27\Lib\site-packages\PyInstaller-2.1dev_-py2.7.egg\PyInstaller\depend\imptracker.py
0:39:40 2013
***************
*** 378,385 ****
          warnings = self.warnings.keys()
          for nm, mod in self.modules.items():
              if mod:
!                 for w in mod.warnings:
!                     warnings.append(w + ' - %s (%s)' % (mod.__name__, 
mod.__file__))
          return warnings

      def getxref(self):
--- 378,388 ----
          warnings = self.warnings.keys()
          for nm, mod in self.modules.items():
              if mod:
!                 try:
!                     for w in mod.warnings:
!                         warnings.append(w + ' - %s (%s)' % (mod.__name__, 
mod.__file__))
!                 except:
!                     warnings.append("Failed warnings: %s" % mod.warnings)
          return warnings

      def getxref(self):

And sqlalchemy version:

>python -c "import sqlalchemy;print sqlalchemy.__version__"
0.8.1

Is it a real bug, and should I toss it into the ticket quene?

-chip

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to