Oleg,

Unfortunately, I could not locate the patch file. Could you please send it to me and I will apply it and test it? Are the changes already in svn?

Thanks,
-- Octav

On Thu, Oct 14, 2010 at 1:27 AM, Oleg Broytman <phd@phd.pp.ru> wrote:
Hello!

On Wed, Oct 13, 2010 at 04:48:44PM -0700, Octav Chipara wrote:
> This also fails to work with selectby as shown in the example below. It
> looks like IntCols can be handled correctly but StringCol cannot.
>
> >   File
> > "/Library/Python/2.6/site-packages/SQLObject-0.13.0-py2.6.egg/sqlobject/sqlbuilder.py",
> > line 341, in _from_python
> >     value = column.from_python(value, SQLObjectState(self.soClass))
> >   File
> > "/Library/Python/2.6/site-packages/SQLObject-0.13.0-py2.6.egg/sqlobject/col.py",
> > line 501, in to_python
> >     connection = state.soObject._connection
> >   File
> > "/Library/Python/2.6/site-packages/SQLObject-0.13.0-py2.6.egg/sqlobject/dbconnection.py",
> > line 837, in __get__
> >     return self.getConnection()
> >   File
> > "/Library/Python/2.6/site-packages/SQLObject-0.13.0-py2.6.egg/sqlobject/dbconnection.py",
> > line 850, in getConnection
> >     "No connection has been defined for this thread "
> > AttributeError: No connection has been defined for this thread or process
> > Exception AttributeError: "'NoneType' object has no attribute 'print_exc'"
> > in <function _removeReceiver at 0x1004e3398> ignored

  You stumbled over exactly the same problem that was discussed a day or
two ago - sometimes validators (especially validators for StringCol) need
to know the current connection (StringCol's validator needs to know
charset/encoding). Please test the patch that I sent and report back if it
helps.

Oleg.
--
    Oleg Broytman            http://phd.pp.ru/            phd@phd.pp.ru
          Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss