Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #884 (closed defect: worksforme)

Opened 13 years ago

Last modified 10 years ago

TypeError: 'NoneType' object is not callable in master.py

Reported by: rob@… Owned by: anonymous
Priority: normal Milestone: 1.x
Component: TurboGears Version: 1.0.1
Severity: normal Keywords: kid, catwalk, identity, needs confirmation
Cc:

Description

Our old friend, NoneType? is not callable has come back:

Page handler: <bound method Root.default of <gotoed.controllers.news.Root object at 0x2a9a170d50>>
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 105, in _run
    self.main()
  File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in default
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py", line 273, in expose
    output = database.run_with_transaction(
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/database.py", line 221, in run_with_transaction
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py", line 290, in <lambda>
    mapping, fragment, *args, **kw)))
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py", line 314, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/errorhandling.py", line 71, in try_call
    return func(self, *args, **kw)
  File "/www/gotoed/gotoed/controllers/news.py", line 119, in default
    return self.drug(d)
  File "<string>", line 3, in drug
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py", line 269, in expose
    output = func._expose(func, accept, func._allow_json,
  File "<string>", line 5, in _expose
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py", line 290, in <lambda>
    mapping, fragment, *args, **kw)))
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py", line 324, in _execute_func
    return _process_output(output, template, format, content_type, mapping, fragment)
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/controllers.py", line 65, in _process_output
    fragment=fragment)
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/view/base.py", line 131, in render
    return engine.render(**kw)
  File "/usr/local/lib/python2.4/site-packages/TurboKid-0.9.5-py2.4.egg/turbokid/kidsupport.py", line 156, in render
    return t.serialize(encoding=self.defaultencoding, output=format, fragment=fragment)
  File "/usr/local/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/__init__.py", line 236, in serialize
    return serializer.serialize(self, encoding, fragment)
  File "/usr/local/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/serialization.py", line 51, in serialize
    text = list(self.generate(stream, encoding, fragment))
  File "/usr/local/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/serialization.py", line 324, in generate
    stream = iter(stream)
  File "/usr/local/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/__init__.py", line 261, in __iter__
    return iter(self.transform())
  File "/usr/local/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/__init__.py", line 316, in transform
    stream = self.pull()
  File "/usr/local/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/__init__.py", line 275, in pull
    self.initialize()
  File "/www/gotoed/gotoed/templates/news_drug.py", line 22, in initialize
  File "/www/gotoed/gotoed/templates/master.py", line 25, in initialize
TypeError: 'NoneType' object is not callable

I think this is related to either SO or Kid - I am using SO in my Kid template.

Behaviour goes away when I restart the server. Maybe this is related to modifying master.kid? I have modified master.kid without a restart before though, and it doesn't exhibit immediately. This happens on the page above and on my "/" page.

SO calls are in master.kid

Change History

comment:1 Changed 13 years ago by tlesher

I can reproduce this reliably with the following steps:

  1. Quickstart a project with SO identity.
  2. Add a user via Catwalk, and start the server.
  3. Log in as the user, then log out.
  4. Make a minor change to master.kid
  5. Try to log in again -> error on returning to the index page.

It does seem to involve SO, since just navigating to other pages that don't hit SO or refreshing the index page doesn't trigger the error.

comment:2 Changed 13 years ago by jorge.vargas

  • Milestone set to 1.0b2

lets confirm this or disregard it for the newest code.

comment:3 Changed 13 years ago by jorge.vargas

could this be related to #1089 I say it based on the way your repoducing it.

comment:4 Changed 12 years ago by alberto

  • Milestone changed from 1.0b2 to 1.1

comment:5 Changed 12 years ago by alberto

Is this still an issue? I can't tell since I've moved to Genshi a long time ago

comment:6 Changed 12 years ago by bitdancer

I think so. I just did more or less what it says in the "reproduce this" above, and got the error. The really odd thing was that if I saved my master.kid template and refreshed the page, it would display correctly, but if I think moved to a different page (the registration page in my case, from the registration product), that page would throw the error. Going back to the previous page and refreshing and it was fine. Go to reg, errror. Save master.kid, refresh. Page displays correct. Go back to previous page and refresh. Throws the error.

I started the project by doing tg-admin quickstart -t registration, and the problem started after I used CatWalk to add a group.

comment:7 Changed 12 years ago by alberto

  • Milestone changed from 1.1 to __unclassified__

Batch moved into unclassified from 1.1 to properly track progress on the later

comment:8 Changed 12 years ago by Johnny Blonde

yes, this is still an issue - it´s driving me nuts. one is getting crazy when this repeatedly occurs with any little (and correct) editing of the master.py...

no solution for this yet?

comment:9 Changed 12 years ago by Johnny Blonde

  • Version changed from 0.9a6 to 1.0.1

comment:10 Changed 11 years ago by Chris Arndt

  • Keywords kid, catwalk, identity, needs confirmation added
  • Component changed from Kid to TurboGears

comment:11 Changed 10 years ago by jorge.vargas

  • Milestone changed from __unclassified__ to 1.x

comment:12 Changed 10 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to worksforme

Cannot reproduce with TG 1.0.8. Please reopen if it's still a problem.

Note: See TracTickets for help on using tickets.