Server got itself in trouble
Traceback (most recent call last):
File "/home/viyyer/lib/python2.4/site-packages/CherryPy-2.1.1-
py2.4.egg/cherrypy/_cphttptools.py", line 271, in run
main()
File "/home/viyyer/lib/python2.4/site-packages/CherryPy-2.1.1-
py2.4.egg/cherrypy/_cphttptools.py", line 502, in main
body = page_handler(*args, **cherrypy.request.paramMap)
File "/home/viyyer/lib/python2.4/site-packages/TurboGears-0.8.9-
py2.4.egg/turbogears/controllers.py", line 124, in newfunc
output = func(self, *args, **kw)
File "/home/viv/raqswiki/lexwiki/lexwiki/controllers.py", line 58,
in
index
alphas = [alpha.alphaname for alpha in
File "/home/viyyer/lib/python2.4/site-packages/
SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/sresults.py", line 149,
in
__iter__
return iter(list(self.lazyIter()))
File "/home/viyyer/lib/python2.4/site-packages/
SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/sresults.py", line 157,
in
lazyIter
return conn.iterSelect(self)
File "/home/viyyer/lib/python2.4/site-packages/
SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/dbconnection.py", line
361, in iterSelect
select, keepConnection=False)
File "/home/viyyer/lib/python2.4/site-packages/
SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/dbconnection.py", line
695, in __init__
self.dbconn._executeRetry(self.rawconn, self.cursor, self.query)
File "/home/viyyer/lib/python2.4/site-packages/
SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/mysql/
mysqlconnection.py",
line 60, in _executeRetry
return cursor.execute(query)
File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line
137,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
33, in defaulterrorhandler
raise errorclass, errorvalue
InterfaceError: (0, '')
Powered by
Use UnicodeString as your validator. And use UTF-8 as the content-type of
your pages.
--
Jorge Godoy <jgo...@gmail.com>
I am using the utf-8 as content type.
I had to change the default encoding from 'ascii' to 'utf8'. I'm just
curious if it makes sense having all the TG stubcode with 'utf8'
default
encoding enabled.
one needs to have this in the start-projectname ( or
projectname-start.py in TG<0.9)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
what say ?
cheers
Vivek
> import sys
> reload(sys)
> sys.setdefaultencoding('utf8')
>
> what say ?
This is a bug that was fixed in 0.9... It isn't needed anymore.
--
Jorge Godoy <jgo...@gmail.com>