Your model wasn't clear but... I had a pretty bad case of the 'NoneType' bug with a v. simple model containing one foreign-key. It seems that for foreign-keys, multiple-joins etc., the order of table creation is important. So if table b has foreign key of type a, table a should be created before b. 'tg-admin sql create' isn't that smart in this regard so it's better to create the tables explicitly with 'table.createTable(ifNotExists=True)', usually placed at the end of model.py. Confusingly some of the common doc examples (TurboTunes from memory) show both methods. You then bypass 'sql create' and let the database tables be created automatically (i think) by, for example, first use of catwalk.
Trying both methods on my simple model showed a difference in order of table-creation (comparing dropped text-files). I can't be sure this was behind the 'NoneType' bug - nature of that indeterministic beast - but my db seems more stable at the moment. I did a few slash, burn, reinstalls for TG in the meantime but have same version as before. I'm running XP, 0.94a, sqlite. Just a thought, and no tg, db guru i, but might be worth a punt if you haven't tried it, k Steve Bergman wrote: > Although I had run: > > easy_install -Uf http://www.turbogears.org/preview/download/index.html > --script-dir /usr/local/bin TurboGears[exp] > > (after correcting the problem I had with easy_install using pythong > 2.3) I still had TGFastData 0.9a3. > > I deleted that (and Turbo*, and everything else that looked related to > TurboGears) from site-packages and re-ran easy_install. It did install > TGFastData 0.9a5, but it had some trouble finding it. It spit out a > message about TGFastData maybe being misspelled, searched around, and > said the best match is 'TGFastData 0.9a5' being the best match. Now I > do seem to have 0.9a5. > > BUT, unfortunately, I am still getting the same error. NoneType is not > callable. :-( > > The current traceback is below: > > ============= > Page handler: <bound method Root.employee_browse of > <review.controllers.Root object at 0xb775c86c>> > Traceback (most recent call last): > File > "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", > line 105, in _run > self.main() > File > "/usr/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 employee_browse > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/controllers.py", > line 210, in expose > output = database.run_with_transaction(func._expose,func, accept, > allow_json, allow_json_from_config,*args, **kw) > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/database.py", > line 216, in run_with_transaction > retval = func(*args, **kw) > File "<string>", line 5, in _expose > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/controllers.py", > line 230, in <lambda> > func._expose.when(rule)(lambda _func, accept, allow_json, > allow_json_from_config,*args,**kw: _execute_func( > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/controllers.py", > line 261, in _execute_func > return _process_output(output, template, format, content_type, > mapping, fragment) > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/controllers.py", > line 57, in _process_output > fragment=fragment) > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/view/base.py", > line 131, in render > return engine.render(**kw) > File > "/usr/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/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/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/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/serialization.py", > line 327, in generate > for ev, item in self.apply_filters(stream): > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/serialization.py", > line 84, in balancing_filter > for ev, item in stream: > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py", > line 206, in _coalesce > for ev, item in stream: > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/filter.py", > line 21, in transform_filter > for ev, item in apply_matches(stream, template, templates, > apply_func): > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/filter.py", > line 31, in apply_matches > item = stream.expand() > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py", > line 95, in expand > for ev, item in self._iter: > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py", > line 164, in _track > for p in stream: > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py", > line 206, in _coalesce > for ev, item in stream: > File "/home/steve/python/review/review/templates/grid_form.py", line > 100, in _pull > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/widgets/meta.py", > line 101, in lockwidget > output = self.__class__.display(self, *args, **kw) > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/widgets/base.py", > line 239, in display > return view.transform(params, template=self.template_c) > File > "/usr/lib/python2.4/site-packages/TurboGears-0.9a5-py2.4.egg/turbogears/view/base.py", > line 136, in transform > return engine.transform(info, template) > File > "/usr/lib/python2.4/site-packages/TurboKid-0.9.5-py2.4.egg/turbokid/kidsupport.py", > line 173, in transform > return ElementStream(t.transform()).expand() > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py", > line 95, in expand > for ev, item in self._iter: > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py", > line 164, in _track > for p in stream: > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/filter.py", > line 21, in transform_filter > for ev, item in apply_matches(stream, template, templates, > apply_func): > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/filter.py", > line 25, in apply_matches > for ev, item in stream: > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py", > line 164, in _track > for p in stream: > File > "/usr/lib/python2.4/site-packages/kid-0.9.1-py2.4.egg/kid/pull.py", > line 206, in _coalesce > for ev, item in stream: > File > "/usr/lib/python2.4/site-packages/TGFastData-0.9a5-py2.4.egg/tgfastdata/templates/datagrid.py", > line 71, in _pull > TypeError: 'NoneType' object is not callable > =============== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

