Re: [PythonReports-users] Images
Brought to you by:
a1s
From: Werner F. B. <wer...@fr...> - 2013-02-10 13:10:05
|
Hi Alex, This time to the list. On 09/02/2013 16:22, alexander smishlajev wrote: ... > I have added the 'expr' attribute to the 'data' element. Hope that > will cover your needs. Not sure, gave it a try but can't get it to work. My getRecipeImage method returns a PIL.Image instance - what should it return? It also looks like data.expr is NOT saved to the template file, i.e. if I save an reopen it the expression is not there. Can you please give me a little pointer on how to use it. When trying the above I see the following exception - probably because I don't use it correctly. Traceback (most recent call last): File "c:\Python27\lib\site-packages\PythonReports\editor\mainmenu.py", line 131, in OnPreview self.app.pyr_editor_env.report_preview() File "c:\Python27\lib\site-packages\PythonReports\editor\environment.py", line 263, in report_preview _printout = self.report_build() File "c:\Python27\lib\site-packages\PythonReports\editor\environment.py", line 245, in report_build return Builder(_template).run(_data) File "c:\Python27\lib\site-packages\PythonReports\builder.py", line 1459, in run self._build(_data_iter, _callback) File "c:\Python27\lib\site-packages\PythonReports\builder.py", line 1475, in _build self.fill_title() File "c:\Python27\lib\site-packages\PythonReports\builder.py", line 1634, in fill_title self.start_group(_group) File "c:\Python27\lib\site-packages\PythonReports\builder.py", line 1852, in start_group self.add_section(self.build_section(_title)) File "c:\Python27\lib\site-packages\PythonReports\builder.py", line 2067, in build_section _section = Section(self, template, _context) File "c:\Python27\lib\site-packages\PythonReports\builder.py", line 469, in __init__ self.build(context) File "c:\Python27\lib\site-packages\PythonReports\builder.py", line 741, in build _element.image = self.builder.image(_item) File "c:\Python27\lib\site-packages\PythonReports\builder.py", line 1313, in image _image = self.image_driver_factory.nullimage() File "c:\Python27\lib\site-packages\PythonReports\drivers.py", line 157, in nullimage return cls.fromdata(PIXEL) TypeError: fromdata() takes at least 3 arguments (2 given) Thanks Werner |