On 10/17/10 4:00 AM, Sibylle Koczian wrote:
> Hello,
>
> I'm working through the AppWizard part of the PyCon2010 tutorial. When I
> try to produce a QuickReport in expanded format from the application I
> wrote myself, following the text of the tutorial, then I get this error:
>
> s...@gespenst-xubuntu:~/bin/dabotut/recipes_aw$ ./recipes_aw.py
> Traceback (most recent call last):
>     File "/home/sib/src/dabo-trunk/dabo/ui/uiwx/dToolBar.py", line 485,
> in __onWxHit
>       self.raiseEvent(dEvents.Hit)
>     File "/home/sib/src/dabo-trunk/dabo/lib/eventMixin.py", line 92, in
> raiseEvent
>       bindingFunction(event)
>     File "/home/sib/src/dabo-trunk/dabo/lib/datanav/Form.py", line 554,
> in onQuickReport
>       rfxml = self.getReportForm(mode)
>     File "/home/sib/src/dabo-trunk/dabo/lib/datanav/Form.py", line 697,
> in getReportForm
>       return self.getAutoReportForm_expanded()
>     File "/home/sib/src/dabo-trunk/dabo/lib/datanav/Form.py", line 896,
> in getAutoReportForm_expanded
>       "Alignment": o.Alignment.lower(),
> AttributeError: 'int' object has no attribute 'lower'
>
> Using the tutorial code from the Dabo website this doesn't happen, the
> report is shown as expected. So somewhere I must have done something
> wrong, but where and what? Looking at the source I think one of the
> controls of my PagEditRecipes.py must have an Alignment property with an
> integer value, right so far? But I can't find the place, not even by
> comparing my version to that from the website. There are some
> differences, but they don't look relevant to this.

The first question in my mind is, "what is object o?". So, I'd find the code 
where 
the traceback occurs (dabo/lib/datanav/Form.py line 896), and on the line above 
it 
place "print o, type(o)". Then I'd run the app again and I bet I'd be able to 
pinpoint from that information what object in my code is somehow assigning an 
int 
value to the Alignment.

As far as Alignment having int values, Dabo wouldn't have let that happen. 
However, 
wxPython objects *do* have int values for their Alignment property (the 
wx.RIGHT etc. 
constants are all ints). So, I bet you've instantiated a raw wxPython object 
somewhere which makes the code in datanav.Form fail.

Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to