I'm using tg 1.5a1 and trying to migrate a project from tg1.1.

The document http://docs.turbogears.org/1.5/Upgrade was very useful,
thanks Chris!

After changing the configuration strings and changing a couple of
other things as described I can actually now start the server.

In the tg1.1 code I used Visits and now I've come across
http://docs.turbogears.org/1.5/VisitBasedSessions which kinda makes me
feel I need to add sessions.py as described. I'm using sqlobject by
the way. So these settings are there,

........
tools.sessions.on = True
tools.sessions.storage_type = 'visit'
visit.on=True
visit.timeout=60
.......


Now the question is whether I really need this sessions.py file? The
reason the whole issue came up is that whenever I access any URL I get
the traceback

Traceback (most recent call last):
  File 
"/home/fetchinson/tmp/xxxx/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py",
line 603, in respond
    self.hooks.run('before_handler')
  File 
"/home/fetchinson/tmp/xxxx/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py",
line 98, in run
    hook()
  File 
"/home/fetchinson/tmp/xxxx/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py",
line 58, in __call__
    return self.callback(**self.kwargs)
  File 
"/home/fetchinson/tmp/xxxx/lib/python2.6/site-packages/TurboGears-1.5a1dev_r7146-py2.6.egg/turbogears/visit/api.py",
line 164, in __call__
    False) and int(get('timeout', '20')) * 60 or None
TypeError: int() argument must be a string or a number, not 'dict'

As you can see I've set up a virtualenv in /home/fetchinson/tmp/xxxx

After looking around it turns out get('timeout', '20') at line 164 in
turbogears/visit/api.py is a dict, the entire configuration dict from
config/app.cfg. Is this normal? Is this the reason I need sessions.py
from the VisitBasedSessions docs?

Cheers,
Daniel


-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown

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