Ed Leafe wrote:
On Oct 27, 2005, at 1:24 AM, [EMAIL PROTECTED] wrote:

The problem is that our default encoding in Dabo is utf8, but the encoding on those test tables is latin-1. Just explicitly set the encoding in the bizobj:


def initProperties(self):
...
self.Encoding = "latin-1"


The above code added to initProperties of biz.Customer.py generated by
AppWizardX using the dabo MySql db produces the following error:

Traceback (most recent call last):
[snip]

File "c:\Python24\Lib\site-packages\Dabo-0.4.2-py2.4.egg\dabo\biz \dBizobj.py",
 line 1278, in _setEncoding
    self._CurrentCursor.Encoding = val
AttributeError: 'NoneType' object has no attribute 'Encoding'


At the point this is being executed, no queries have yet been run, so self._CurrentCursor has not yet been created. I've just attempted to remedy this by modifying the bizobj code to create a cursor object in this event.

Right, I actually forgot that I had been aware of this problem when I answered the question yesterday. I've been putting the "self.Encoding = 'latin-1'" in afterInit() instead of initProperties(), which works but isn't optimal.

--
Paul McNett
http://paulmcnett.com
http://dabodev.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to