Hey guys,

Has anyone had any luck getting toolbox/catwalk to work on dreamhost or
any other shared hosts?  I've run into a few problems trying to mount
either of them as an app.  I can't get my server to start when trying
to mount toolbox.

Here's a few dumps at varying stages:

Code in controllers.py:
    toolbox = toolbox.Toolbox()
    toolbox.catwalk = CatWalk(model)

This gives me a message:
TypeETraceback (most recent call last):
  File "./testing.fcgi", line 97, in ?
    tg_init()
  File "./testing.fcgi", line 92, in tg_init
    exec('from %s import %s as Root' % (package_name, class_name))
  File "<string>", line 1, in ?
  File
"/home/tgtest/testing.elementarycatastrophe.com/tgtest/tgtest/controllers.py",
line 19, in ?
    class Root(controllers.RootController):
  File
"/home/tgtest/testing.elementarycatastrophe.com/tgtest/tgtest/controllers.py",
line 20, in Root
    toolbox = toolbox.Toolbox()
TypeError: __init__() takes exactly 2 arguments (1 given)
rror: __init__() takes exactly 2 arguments (1 given)

Which led me to believe that I should include the project name as an
argument when mounting toolbox.

Here's the result after I did that:

Traceback (most recent call last):
  File "./testing.fcgi", line 97, in ?
    tg_init()
  File "./testing.fcgi", line 92, in tg_init
    exec('from %s import %s as Root' % (package_name, class_name))
  File "<string>", line 1, in ?
  File
"/home/tgtest/testing.elementarycatastrophe.com/tgtest/tgtest/controllers.py",
line 19, in ?
    class Root(controllers.RootController):
  File
"/home/tgtest/testing.elementarycatastrophe.com/tgtest/tgtest/controllers.py",
line 20, in Root
    toolbox = toolbox.Toolbox(tgtest)
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/toolbox/base.py",
line 95, in __init__
    self.require = identity.from_any_host(hostlist)
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/identity/conditions.py",
line 220, in __init__
    host_predicates= [from_host(h) for h in hosts]
TypeError: iteration over non-sequence

Trying to mount just catwalk, no toolbox - my app will start up, but
trying to access catwalk gives me this error (which was discussed a
little earlier in this thread, but I couldn't manage to resolve it:
http://groups.google.com/group/turbogears/browse_thread/thread/ba9837166ca8ce60/bcfad378076c3ca8?q=catwalk+dreamhost&rnum=2#bcfad378076c3ca8
)

Traceback (most recent call last):
  File
"/home/.castor/tgtest/lib/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
line 105, in _run
    self.main()
  File
"/home/.castor/tgtest/lib/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 index
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/controllers.py",
line 280, in expose
    output = database.run_with_transaction(
  File "<string>", line 5, in run_with_transaction
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/database.py",
line 243, in so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/controllers.py",
line 297, in <lambda>
    mapping, fragment, *args, **kw)))
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/controllers.py",
line 321, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/errorhandling.py",
line 68, in try_call
    return func(self, *args, **kw)
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/toolbox/catwalk/__init__.py",
line 1129, in index
    return dict(models=self.models())
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/toolbox/catwalk/__init__.py",
line 1112, in models
    return self.order_models(objs)
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/toolbox/catwalk/__init__.py",
line 769, in order_models
    ordered = self.load_models_order()
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/toolbox/catwalk/__init__.py",
line 765, in load_models_order
    state = self.load_state()
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/toolbox/catwalk/__init__.py",
line 625, in load_state
    if not os.path.exists(self.state_path()): return {}
  File
"/home/.castor/tgtest/downloads/turbogears/turbogears/toolbox/catwalk/__init__.py",
line 613, in state_path
    catwalk_session_dir =
os.path.join(turbogears.util.get_package_name(),'catwalk-session')
  File "/home/tgtest/lib//lib/python2.4/posixpath.py", line 62, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Any help would be much appreciated.

Thanks,
Mike


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to