I tried setting up my app according to the instructions here:

http://docs.turbogears.org/1.0/CreatingBigApplications


Once I set up my model files:

cape/model:
Bill.py
Meeting.py
User.py
__init__.py
base.py
model_utils.py
Site.py

and wrote the __init__.py:

from datetime import datetime
from sqlobject import *
import pkg_resources
pkg_resources.require("SQLObject>=0.10.1")
from turbogears.database import PackageHub
from turbogears import identity

hub = PackageHub("cape")
__connection__ = hub

from base import *
from Bill import *
from Meeting import *
from model_utils import *
from Site import *


Now when I run start-cape.py or tg-admin sql list I get the following
error:

 tg-admin sql list
Traceback (most recent call last):
  File "/usr/local/bin/tg-admin", line 8, in <module>
    load_entry_point('TurboGears==1.0.7', 'console_scripts', 'tg-
admin')()
  File "/Library/Python/2.5/site-packages/TurboGears-1.0.7-py2.5.egg/
turbogears/command/base.py", line 378, in main
    command.run()
  File "/Library/Python/2.5/site-packages/TurboGears-1.0.7-py2.5.egg/
turbogears/command/base.py", line 127, in run
    command.the_runner.run(sys.argv)
  File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/
sqlobject/manager/command.py", line 101, in run
    runner.run()
  File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/
sqlobject/manager/command.py", line 307, in run
    self.command()
  File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/
sqlobject/manager/command.py", line 605, in command
    classes = self.classes(require_connection=False)
  File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/
sqlobject/manager/command.py", line 319, in classes
    all.extend(self.classes_from_egg(egg_spec))
  File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/
sqlobject/manager/command.py", line 487, in classes_from_egg
    moduleloader.load_module(mod)))
  File "/Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg/
sqlobject/util/moduleloader.py", line 5, in load_module
    mod = __import__(module_name)
  File "/Users/mimiller/Projects/CAPE/cape/model/__init__.py", line
13, in <module>
    from Bill import *
  File "/Users/mimiller/Projects/CAPE/cape/model/Bill.py", line 1, in
<module>
    class AccountSet(SQLObject):
NameError: name 'SQLObject' is not defined

So changing the directory structure broke the path to SQLObject?  I've
tried
 export PYTHONPATH=/Library/Python/2.5/site-packages/SQLObject-0.10.2-
py2.5.egg/

any other suggestions?

d

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to