TypeError: 'NoneType' object is not callable

21 views
Skip to first unread message

Jorge Godoy

unread,
Feb 14, 2006, 11:55:56 AM2/14/06
to TurboGears

I started getting this famous error, what didn't happened before. I noticed
that this happens when I enter several forms of mine. If I restart the
application and reload the page, it works perfectly... Then, I start
navigating and after four or five pages (other forms), it happens again -- and
then, every form fails...

Can anybody suggest me something to solve this problem?

The page, when the problem happens, is supposed to render a fastdatagrid
only.

================================================================================
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-py2.4.egg/cherrypy/_cphttptools.py", line 99, in _run
self.main()
File "/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-py2.4.egg/cherrypy/_cphttptools.py", line 247, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in index
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py", line 198, in expose
func, tg_format, html, fragment, *args, **kw)
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/database.py", line 193, in run_with_transaction
retval = func(*args, **kw)
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py", line 215, in _execute_func
output = errorhandling.try_call(func, self, *args, **kw)
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py", line 64, in try_call
output = func(self, *args, **kw)
File "/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/substancias.py", line 43, in index
return self.substancias(substancia_id)
File "<string>", line 3, in substancias
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py", line 193, in expose
output = _execute_func(self, func, tg_format, html, fragment,
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py", line 220, in _execute_func
return _process_output(tg_format, output, html, fragment)
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py", line 68, in _process_output
fragment=fragment)
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/view.py", line 60, in render
return engine.render(info, format, fragment, template)
File "/usr/lib/python2.4/site-packages/TurboKid-0.9.0-py2.4.egg/turbokid/kidsupport.py", line 136, in render
return t.serialize(encoding=self.defaultencoding, output=format, fragment=fragment)
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/__init__.py", line 236, in serialize
return serializer.serialize(self, encoding, fragment)
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/serialization.py", line 51, in serialize
text = list(self.generate(stream, encoding, fragment))
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/serialization.py", line 324, in generate
stream = iter(stream)
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/__init__.py", line 261, in __iter__
return iter(self.transform())
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/__init__.py", line 316, in transform
stream = self.pull()
File "/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/kid/kid/__init__.py", line 275, in pull
self.initialize()
File "/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/templates/form_generico.py", line 20, in initialize
File "/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/templates/master.py", line 19, in initialize
TypeError: 'NoneType' object is not callable
================================================================================


TIA,
--
Jorge Godoy <jgo...@gmail.com>

Max Ischenko

unread,
Feb 14, 2006, 3:14:09 PM2/14/06
to TurboGears

Are you sure the error can't be caused by mere programming logic error
-- e.g. you try to call None in your template?

Max.

Jorge Godoy

unread,
Feb 14, 2006, 3:40:19 PM2/14/06
to turbo...@googlegroups.com
"Max Ischenko" <isch...@gmail.com> writes:

> Are you sure the error can't be caused by mere programming logic error
> -- e.g. you try to call None in your template?

Positively sure. If it was like that, it wouldn't have worked before and it
wouldn't work with just a refresh of the page after the restart.

--
Jorge Godoy <jgo...@gmail.com>

Keith R. Fieldhouse

unread,
Feb 14, 2006, 7:19:33 PM2/14/06
to turbo...@googlegroups.com
Jorge Godoy wrote:
> "Max Ischenko" <isch...@gmail.com> writes:
>
>
>> Are you sure the error can't be caused by mere programming logic error
>> -- e.g. you try to call None in your template?
>>
>
> Positively sure. If it was like that, it wouldn't have worked before and it
> wouldn't work with just a refresh of the page after the restart.
>
>
For what it's worth, I'm getting essentially the same stack trace with
the same frequency and the same behavior (restart, reload everthing's
fine for a while then boom again).

Keith

Michele Cella

unread,
Feb 14, 2006, 7:23:39 PM2/14/06
to TurboGears
I was getting the same error some times ago in fastdata, are you
running the latests kid and turbokid?

Ciao
Michele

Jorge Godoy

unread,
Feb 14, 2006, 8:24:42 PM2/14/06
to turbo...@googlegroups.com
"Michele Cella" <michel...@gmail.com> writes:

> I was getting the same error some times ago in fastdata, are you
> running the latests kid and turbokid?

I am. TurboKid 0.9? I've tried easy_install before reporting this error
here. And I'm using Kid from SVN trunk.

--
Jorge Godoy <jgo...@gmail.com>

Keith R. Fieldhouse

unread,
Feb 14, 2006, 8:31:22 PM2/14/06
to turbo...@googlegroups.com
Michele Cella wrote:
> I was getting the same error some times ago in fastdata, are you
> running the latests kid and turbokid?
>
I think so. Is there an easy way to tell before I re-do an easy_install
. in the appropriate thirdparty directories?

Keith

Mike Sarahan

unread,
Feb 17, 2006, 10:59:23 AM2/17/06
to TurboGears
Keith,

run "tg-admin info" anywhere to see what all you have installed.
Also, Turbokid is in plugins/kid, not thirdparty/kid (kid is there).

I'm also running into this error, with TurboKid 0.9.0 and kid 0.8. Kid
0.9 gives me a bizarre sitetemplate error that I've been unable to
track down. Just upgraded to turbokid 0.9.1, so I'm hoping it'll clear
up.

Mike

prla

unread,
Feb 28, 2006, 2:11:04 PM2/28/06
to TurboGears
I'm not sure you guys have already solved this problem, but this was
bitting me too and upgrading TurboKid seems to have solved it for me.
In this case, I upgraded from TurboKid 0.9.0 to TurboKid 0.9.1dev-r787
(which was sitting in my plugins/kid since I pulled TG from SVN a
couple of days ago).

Cheers,

P.

Richard (koorb)

unread,
Mar 13, 2006, 11:38:02 AM3/13/06
to TurboGears
Did we get to the bottom of this? Because this it's happening to me!

Anyone got any advice, here my tg-admin info:

TurboGears 0.9a1
nose 0.8.4
RuleDispatch 0.5a0
setuptools 0.6a10
FormEncode 0.4
cElementTree 1.0.5-20051216
PasteScript 0.4.1
elementtree 1.2.6
simplejson 1.1
SQLObject 0.7.1dev-r1457
CherryPy 2.2.0-beta
TurboKid 0.9.0
PyProtocols 1.0a0
INITools 0.2dev-r1029
PasteDeploy 0.3
Paste 0.3
FormEncode 0.4
kid 0.8
elementtree 1.2.6

Michele Cella

unread,
Mar 13, 2006, 11:41:34 AM3/13/06
to TurboGears
Hi Richard,

I think you should upgrade your TurboKid.

Ciao
Michele

Richard (koorb)

unread,
Mar 13, 2006, 12:05:16 PM3/13/06
to TurboGears
Hey Michele,

Just tried, tells me 0.9.0 is already the active version? is there a
specific development version I need?

Richard (koorb)

unread,
Mar 13, 2006, 12:16:11 PM3/13/06
to TurboGears
oh hey, just tried easy_install -U to force upgrade 0.9.1 all seems
well!

Mike Sarahan

unread,
Mar 13, 2006, 12:21:00 PM3/13/06
to TurboGears
Richard,

how are you trying to get the new version?

the best way to get the latest of turbokid is to go into the
plugins/kid dir of your trunk checkout, and run "easy_install ."

I haven't upgraded since february 20th (if it isn't broken, don't fix
it), and my turbokid version is 0.9.1dev-r787

Also, you might try doing the same thing for kid (but it's in
thirdparty/kid) - I noticed your version is 0.8. Mine is 0.9. I
believe the fix has been in turbokid, but this might be something else
to try.

I don't know if the above instructions work with the alpha release.
Haven't tried it yet. If those folders exist, though, give it a shot.

-Mike

Reply all
Reply to author
Forward
0 new messages