This is a fresh install of both turbogears and Postgres (8.2). Postgres seems to be running fine (inserting data from source works a OK).
On Jun 19, 4:40 pm, "Ian Wilson" <[EMAIL PROTECTED]> wrote: > I have seen this error and I seem to remember it being some > requirements mismatch(ie. wrong version of MySQL-python or sqlobject). > Since you are using Postgres.. I guess that just leaves SQLObject and > something else. Did you recently upgrade something or change systems? > > -Ian > > On 6/19/07, Glenn <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I am getting a error when trying to pull data from postgres DB into a > > simple page. The error is: > > > Page handler: <bound method Root.companylist of > > <picker.controllers.Root object at 0x01476350>> > > Traceback (most recent call last): > > File "c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy > > \_cphttptools.py", line 105, in _run > > self.main() > > File "c:\python24\lib\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 companylist > > File "c:\python24\lib\site-packages\TurboGears-1.0.2.2-py2.4.egg > > \turbogears\controllers.py", line 334, in expose > > output = database.run_with_transaction( > > File "<string>", line 5, in run_with_transaction > > File "c:\python24\lib\site-packages\TurboGears-1.0.2.2-py2.4.egg > > \turbogears\database.py", line 303, in so_rwt > > retval = func(*args, **kw) > > File "<string>", line 5, in _expose > > File "c:\python24\lib\site-packages\TurboGears-1.0.2.2-py2.4.egg > > \turbogears\controllers.py", line 351, in <lambda> > > mapping, fragment, args, kw))) > > File "c:\python24\lib\site-packages\TurboGears-1.0.2.2-py2.4.egg > > \turbogears\controllers.py", line 391, in _execute_func > > return _process_output(output, template, format, content_type, > > mapping, fragment) > > File "c:\python24\lib\site-packages\TurboGears-1.0.2.2-py2.4.egg > > \turbogears\controllers.py", line 82, in _process_output > > fragment=fragment) > > File "c:\python24\lib\site-packages\TurboGears-1.0.2.2-py2.4.egg > > \turbogears\view\base.py", line 131, in render > > return engine.render(**kw) > > File "c:\python24\lib\site-packages\TurboKid-1.0.1-py2.4.egg\turbokid > > \kidsupport.py", line 192, in render > > return t.serialize(encoding=self.defaultencoding, output=format, > > fragment=fragment) > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \__init__.py", line 299, in serialize > > raise_template_error(module=self.__module__) > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \__init__.py", line 297, in serialize > > return serializer.serialize(self, encoding, fragment, format) > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \serialization.py", line 105, in serialize > > text = ''.join(self.generate(stream, encoding, fragment, format)) > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \serialization.py", line 630, in generate > > for ev, item in self.apply_filters(stream, format): > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \serialization.py", line 163, in format_stream > > for ev, item in stream: > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \parser.py", line 219, in _coalesce > > for ev, item in stream: > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \serialization.py", line 478, in inject_meta_tags > > for ev, item in stream: > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \parser.py", line 177, in _track > > for p in stream: > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \filter.py", line 30, in apply_matches > > item = stream.expand() > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \parser.py", line 106, in expand > > for ev, item in self._iter: > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \parser.py", line 177, in _track > > for p in stream: > > File "c:\python24\lib\site-packages\kid-0.9.5-py2.4.egg\kid > > \parser.py", line 219, in _coalesce > > for ev, item in stream: > > File "C:\picker\picker\templates\companylist.py", line 72, in _pull > > File "c:\python24\lib\site-packages\SQLObject-0.7.7-py2.4.egg > > \sqlobject\sresults.py", line 160, in __iter__ > > return iter(list(self.lazyIter())) > > File "c:\python24\lib\site-packages\SQLObject-0.7.7-py2.4.egg > > \sqlobject\sresults.py", line 168, in lazyIter > > return conn.iterSelect(self) > > File "c:\python24\lib\site-packages\SQLObject-0.7.7-py2.4.egg > > \sqlobject\dbconnection.py", line 778, in iterSelect > > select, keepConnection=True))) > > File "c:\python24\lib\site-packages\SQLObject-0.7.7-py2.4.egg > > \sqlobject\dbconnection.py", line 723, in next > > obj = self.select.sourceClass.get(result[0], > > selectResults=result[1:], connection=self.dbconn) > > File "c:\python24\lib\site-packages\SQLObject-0.7.7-py2.4.egg > > \sqlobject\main.py", line 920, in get > > val._init(id, connection, selectResults) > > File "c:\python24\lib\site-packages\SQLObject-0.7.7-py2.4.egg > > \sqlobject\main.py", line 966, in _init > > self._SO_selectInit(selectResults) > > File "c:\python24\lib\site-packages\SQLObject-0.7.7-py2.4.egg > > \sqlobject\main.py", line 1157, in _SO_selectInit > > colValue = col.to_python(colValue, self._SO_validatorState) > > File "c:\python24\lib\site-packages\SQLObject-0.7.7-py2.4.egg > > \sqlobject\col.py", line 546, in to_python > > return unicode(value, self.db_encoding) > > File "C:\Python24\lib\encodings\utf_8.py", line 16, in decode > > return codecs.utf_8_decode(input, errors, True) > > TypeError: function takes exactly 5 arguments (1 given) > > > My model.py (not shown is the password stuff that TurboGears put in > > the model): > > > class company(SQLObject): > > """ > > A Company name. > > """ > > name = UnicodeCol(length=200) > > > my kid template is : > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// > >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml" > > xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> > > <head> > > <meta content="text/html; charset=utf-8" > > http-equiv="Content-Type" py:replace="''" /> > > <title>Welcome to Turbogears</title> > > </head> > > <body> > > <div id="getting_started"></div> > > <a> Name</a> > > <li py:for="c in company"> > > <h3 py.replace="c.name"> Name </h3> > > </li> > > </body> > > </html> > > > If I remove the "py:for..." and py.replace lines, all runs well (not > > there is much left). Anyone run into this? > > > Thanks > > Glenn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

