Exception TypeError: "'NoneType' object is not callable" with Python 2.6.1+
Francesco Montorsi <[email protected]> Mon, 16 Mar 2009 17:37:49 +0100
| Newsgroups | gmane.comp.sysutils.bakefile.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm using Ubuntu Jaunty which ships with Python 2.6.1+ and everytime I run
bakefile_gen I see
Exception TypeError: "'NoneType' object is not callable" in ignored
printed right after a call to bakefile.
I managed to bisect the problem down to (apparently) updateTargets() in
bakefile_gen.py.
With the attached patch I see:
frm@ubuntu:~/work/bakefile/tests$ bakefile_gen --verbose -f msvc -b
headers/headers.bkl
loading task description from /home/frm/work/bakefile/tests/Bakefiles.bkgen...
scanning directories for bakefiles...
building rules...
determining which makefiles are out of date...
...1 out of 1 will be updated
starting
[1/1] generating msvc from headers/headers.bkl
/usr/bin/python /usr/local/lib/bakefile/bakefile.py -fmsvc
-DFORMAT_HAS_MAKE_INSTALL=1 --output-deps=/tmp/bakefile9BTwgU
--output-changes=/tmp/bakefileQQonn1 --xml-cache=/tmp/bakefile2tHcS1/xmlcache0
headers/headers.bkl
checking
endchecking
... lots of checking/endchecking ...
starting
checking
endchecking
writing headers/makefile.vc
starting
checking
endchecking
Exception TypeError: "'NoneType' object is not callable" in ignored
starting
checking
endchecking
1 files modified
so it looks like it's something in the while line (432) ?
Running bakefile separately (but without --xml-cache doesn't trigger the
exception). Also if the makefile is already updated I get no exception just:
loading task description from /home/frm/work/bakefile/tests/Bakefiles.bkgen...
scanning directories for bakefiles...
building rules...
determining which makefiles are out of date...
...0 out of 1 will be updated
0 files modified
I should mention that this is not _critical_ (makefiles are still generated) but
very annoying (gets repeated tons of times).
Francesco
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Bakefile-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bakefile-devel
temp.patch
(text/x-diff, 1.2 KB)
Index: src/bakefile_gen.py
===================================================================
--- src/bakefile_gen.py (revisione 1295)
+++ src/bakefile_gen.py (copia locale)
@@ -430,6 +430,7 @@
try:
try:
while len(needUpdate) > 0 or childProcessesCnt > 0:
+ print 'starting'
# start new processes:
for p in range(0,jobs):
if len(needUpdate) > 0 and childProcesses[p] == None:
@@ -442,12 +443,15 @@
childProcesses[p].run()
# check for finished processes:
+ print 'checking'
for p in range(0,jobs):
pr = childProcesses[p]
if pr != None and pr.poll():
childProcessesCnt -= 1
childProcesses[p] = None
modifiedFiles += pr.finish()
+ print 'endchecking'
+
# FIXME: Unfortunately, Python's subprocess module doesn't
# provide any way to get notified about child process'
# termination, so we have to poll it. Wait a bit here to