On Mon, Jun 30, 2008 at 11:21 AM, Paul McNett <[EMAIL PROTECTED]> wrote:
>
> Nate Lowrie wrote:
> > "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dGrid.py", li
> > ne 2921, in addColumn
> > newOrd = maxOrd + 10
> > TypeError: coercing to Unicode: need string or buffer, int found
>
> For some reason, a prior column.Order is a unicode object, not an int.
> Try putting this assert in the Column setter:
>
> (line 1281)
>
> def _setOrder(self, val):
> assert isinstance(val, int)
>
> and see if that helps us locate what is happening.
>
Found it...It is an artifact of the CD storing order as unicode
objects. Look at the traceback below. Order is unicode. My guess is
that the translator is not converting it to a string and we don't
bother to check in _setOrder. The easiest solution is just to attempt
to convert the value in _setOrder if it isn't an int.
Nate L.
Traceback (most recent call last):
File "main.py", line 15, in <module>
app.start()
File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\dApp.py", line 317, i
n start
self.setup()
File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\dApp.py", line 282, i
n setup
self.initUIApp()
File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\dApp.py", line 309, i
n initUIApp
self.uiApp.setup()
File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\uiApp.py", li
ne 277, in setup
frm = self.dApp.MainForm = dabo.ui.createForm(mfc)
File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\__init__.py",
line 1115, in createForm
frm = cls(*args, **kwargs)
File "c:\docume~1\nwlowri\locals~1\temp\tmp7ktcfn.py", line 145, in __init__
col.setPropertiesFromAtts({u'Caption': u'SKU', u'Order': u'0', u'DataField':
u'SKU'})
File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\lib\propertyHelperMix
in.py", line 232, in setPropertiesFromAtts
setattr(self, prop, val)
File "c:\Python25\lib\site-packages\dabo-full\trunk\dabo\ui\uiwx\dGrid.py", li
ne 1281, in _setOrder
assert isinstance(val, int)
AssertionError
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]