OK, opening a ticket #1021 ... It looks like the problem is that if there is anything wrong with the model, nosetests (or something) tries to reload the model.
On 7/4/06, isaac <[EMAIL PROTECTED]> wrote: > Just an update on this... I didn't put in a ticket earlier because > I'm not sure that it's tgbig that's causing the problem (I'm seeing > it now with standard projects too). It seems to come up in certain > situations where there are InheritableSQLObjects involved where the > inherited objects have joins, or sometimes if there is a problem with > the model such as a MultipleJoin that isn't properly matched to its > corresponding ForeignKey (an error you'd notice when running the > project or using the tg-admin shell, but nosetests -s gives you this > other error instead). This is TG 0.9a6, and the behavior is the same > if I switch from SQLObject 0.7.1dev_r1675 to 0.8dev_r1814. > > I hope this helps, it seems like a place where some other error pops > to the surface first, preventing you from seeing what the actual > error is. > > --i > > On Jun 23, 2006, at 7:29 AM, Kevin Dangoor wrote: > > > > > On Jun 22, 2006, at 5:33 PM, isaac wrote: > > > >> I'm having a weird issue where the same model.py and test_model.py > >> pass in a "normal" quickstarted project, but fail if I quickstart > >> with > >> the "big" template. > >> > >> Anyone have any clues? (this is 0.9a6) > > > > That's a pretty strange error to get, given that the model module > > isn't different in tgbig. Sounds easily reproducible, though, so go > > ahead and open a ticket. > > > > Kevin > > > > (here's the original message in case) > > > From: [EMAIL PROTECTED] > > Subject: tgbig causes nosetests problem? > > Date: June 22, 2006 4:33:38 PM CDT > > To: [email protected] > > > > Hi, > > > > I'm having a weird issue where the same model.py and test_model.py > > pass in a "normal" quickstarted project, but fail if I quickstart with > > the "big" template. > > > > Anyone have any clues? (this is 0.9a6) > > > > (At this point, I haven't touched any controller code yet.) > > > > TIA > > -----i > > > > (here's the traceback:) > > > > Traceback (most recent call last): > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > > python2.4/site-packages/nose-0.9.0b2-py2.4.egg/nose/suite.py", > > line 44, in run > > self.setUp() > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > > python2.4/site-packages/nose-0.9.0b2-py2.4.egg/nose/suite.py", > > line 187, in setUp > > self.module = _import(self.moduleName, [self.path], self.conf) > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > > python2.4/site-packages/nose-0.9.0b2-py2.4.egg/nose/importer.py", > > line 93, in _import > > mod = load_module(fqname, fh, filename, desc) > > File "/Users/Shared/tgdev/SomeProject/someproject/tests/ > > test_model.py", > > line 18, in ? > > from someproject.model import * > > File "model.py", line 18, in ? > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > > python2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/ > > sqlobject/declarative.py", > > line 108, in __new__ > > cls.__classinit__(cls, new_attrs) > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > > python2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/ > > sqlobject/main.py", > > line 802, in __classinit__ > > classregistry.registry(cls.sqlmeta.registry).addClass(cls) > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > > python2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/ > > sqlobject/classregistry.py", > > line 91, in addClass > > '__file__', '(unknown)'))) > > ValueError: class VisitIdentity is already in the registry (other > > class is <class 'someproject.model.VisitIdentity'>, from the module > > someproject.model in > > /Users/Shared/tgdev/SomeProject/someproject/model.pyc; attempted new > > class is <class 'someproject.model.VisitIdentity'>, from the module > > someproject.model in > > /Users/Shared/tgdev/SomeProject/someproject/model.pyc) > > > > ---------------------------------------------------------------------- > > Ran 0 tests in 4.527s > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

