Re: [PythonReports-users] PythonReport - deprecation warning on et.getchildren
Brought to you by:
a1s
|
From: Werner F. B. <wer...@fr...> - 2012-12-21 07:09:41
|
Hi Alex,
On 20/12/2012 20:54, alexander smishlajev wrote:
> Werner F. Bruhin wrote, at 20.12.2012 20:57:
...
>> This is the traceback I see in WingIDE:
>>
>> Error saving template file This method will be removed in future
>> versions. Use 'list(elem)' or iteration over elem instead.
>> Traceback (most recent call last):
>> File "c:\Python27\lib\site-packages\PythonReports\editor\toolbar.py",
>> line 47, in OnSave
>> self.app.pyr_editor_env.report_save()
>>
>> File "c:\Python27\lib\site-packages\PythonReports\datatypes.py", line
>> 1070, in writexml
>> for _child in element.getchildren():
>> File "c:\Python27\lib\xml\etree\ElementTree.py", line 350, in getchildren
>> DeprecationWarning, stacklevel=2
>> DeprecationWarning: This method will be removed in future versions. Use
>> 'list(elem)' or iteration over elem instead.
> Right. That's error, and it has to be fixed.
I don't know/see how to fix it. Will you report it to ElementTree?
I am o.k. with just doing the "warnings.simplefilter("ignore")" just
before calling the designer and then I reset the warnings when it is
closing.
Have a good weekend
Werner
|