Re: [PythonReports-users] Images
Brought to you by:
a1s
|
From: Werner F. B. <wer...@fr...> - 2013-02-11 09:02:21
|
On 11/02/2013 09:05, alexander smishlajev wrote:
...
> Indeed it is not evaluated. It shouldn't be, with your template
> contents. Please change the <data> line to <data
> expr="ru.getRecipeImagePNG(THIS.id)" />
Explains why I like to use the designer.
I have this for my image:
<image type="png">
<box height="30" width="75" x="374" y="50" />
<data expr="ru.getRecipeImagePNG(THIS.id)" />
</image>
And I see this exception, not that my breakpoint in the
getRecipeImagePNG is still never hit.
AttributeError: 'NoneType' object has no attribute 'strip'
File "c:\dev\twcbv4\twcbsrc\controllers\dreports.py", line 555, in <module>
dlg.ShowModal()
File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_windows.py", line
805, in ShowModal
return _windows_.Dialog_ShowModal(*args, **kwargs)
File
"c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\agw\aquabutton.py",
line 434, in OnLeftUp
self.Notify()
File
"c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\agw\aquabutton.py",
line 864, in Notify
self.GetEventHandler().ProcessEvent(evt)
File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_core.py", line
4154, in ProcessEvent
return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
File "c:\dev\twcbv4\twcbsrc\controllers\dreports.py", line 340, in
doReportPreview
env.report_open(self.getReportFile())
File
"c:\Python27\Lib\site-packages\PythonReports\editor\environment.py",
line 201, in report_open
templateloader.load_template(_template, _report)
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 23, in load_template
load_report(template.getroot(), report)
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 42, in load_report
load_groups(_xml_layout, report)
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 92, in load_groups
load_group(_xml_group, report)
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 107, in load_group
load_section_pair(xml_group, _report_group, (te.Title.tag,
te.Summary.tag))
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 113, in load_section_pair
section_pair.get_first())
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 126, in load_one_of_pair
load_section(xml_section, report_section)
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 135, in load_section
load_shapes(xml_section, report_section)
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 170, in load_shapes
SHAPES_LINK[_section_child.tag])
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 191, in load_shape
load_one_validator(_xml_data, _shape, te.Data)
File
"c:\Python27\Lib\site-packages\PythonReports\editor\templateloader.py",
line 222, in load_one_validator
XmlBody(xml_elmnt.text.strip()))
Best regards
Werner
|