On Nov 29, 2006, at 10:59 PM, Steve Rose wrote:
> I ran the webtest.py program from the command prompt ('python
> webtest.py') and got this traceback. Note, I had to hand type the
> output as I have forgotten how to pipe the message to a text file
> from a
> DOS prompt (prn or something?). Hope I typed it correctly as it is
> quite a mess.
Wow, you typed that all by hand? I wouldn't have had the patience!!
You can redirect output using something like 'python webtest.py >
out.txt'. But if you run the program normally and then want to copy
the output from the window, it's still possible:
From the DOS prompt, you can click on the icon in the upper left of
the title bar. There is an 'Edit' option in the resulting menu, where
you can choose 'Select All', followed by 'Copy'. You can then paste
the copied output into any document, and save yourself some typing.
> File "C:\Python24\Lib\site-packages\Dabo
> Runtime\dabo\lib\datanav\Form.py", line 198 in getMenu title =
> &%s\tAlt+3" % (_(self.pageFrame.Pages[index].Caption))
>
> File "C:\Python24\Lib\site-packages\Dabo Runtime\dabo\dLocalize.py",
> line 63, in _return __trans.ugettext(str(s))
>
> File "C:\Python24\lib\gettext.py", line 217, in ugettext return
> unicode(message)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in
> position 2:
> ordinal not in range(128)
This shows that the "offending" string is the Caption of the Edit
page of the app, which would be based on the Caption of the
underlying bizobj. If you look in your webtest/biz directory, you
should have:
__init__.py(c)
Base.py(c)
<Bizobj>.py(c)
...where <Bizobj> represents the specific bizobjs for your app. If
you look in those bizobj-specific files, somewhere around line 10
should be where the Caption is set:
1 # -*- coding: utf-8 -*-
2
3 from Base import Base
4
5
6 class Zipcodes(Base):
7
8 def initProperties(self):
9 self.super()
10 self.Caption = "Zipcodes"
11 self.DataSource = "zipcodes"
12 self.KeyField = "iid"
Do you have something in the line that sets the Caption that would
not be a regular ASCII value?
> I tried to find "dabo/dabo/dialogs/about.py" in the runtime
> installation
> but had no luck, but maybe I just missed it.
It's actually dabo/ui/dialogs/about.py
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users