[SOLVED] openerp 7 account.invoice traceback NoneType
5 posts • Page 1 of 1
[SOLVED] openerp 7 account.invoice traceback NoneTypehello
I just tried to create an aeroo report based on an already existing sale.order report what i did is copied the odt file renamed it to something else and created a new report inside openerp at aeroo reports module and created as usual the print button. when i click the report i immediately get this NoneType' object has no attribute '__getitem__' (<type 'exceptions.TypeError'>, TypeError("'NoneType' object has no attribute '__getitem__'",), <traceback object at 0x7fb9d88a7518>) i just thought my report is using wrong variables and fields aso .. so i limited it down to remove my code step by step. at the end i removed everything and copied a complete BLANK odt file and uploaded it into this report, same error pops up ... any idea where i can start to look at ? additional info from log 2013-02-26 12:56:27,371 27445 INFO ? openerp.loglevels.deprecated.report_aeroo: Start process report.Rechnungs_Bericht_LB (account.invoice) 2013-02-26 12:56:27,452 27445 ERROR ? openerp.service.web_services: Exception: 'NoneType' object has no attribute '__getitem__' Traceback (most recent call last): File "/opt/openerp/11069-lightbase/server/openerp/service/web_services.py", line 700, in go (result, format) = obj.create(cr, uid, ids, datas, context) File "/opt/openerp/11069-lightbase/custom-addons-loaded/report_aeroo/report_aeroo.py", line 713, in create return fnct(cr, uid, ids, data, report_xml, context) File "/opt/openerp/11069-lightbase/custom-addons-loaded/report_aeroo/report_aeroo.py", line 656, in create_source_odt return self.create_single_pdf(cr, uid, ids, data, report_xml, context) File "/opt/openerp/11069-lightbase/custom-addons-loaded/report_aeroo/report_aeroo.py", line 497, in create_single_pdf return self.create_aeroo_report(cr, uid, ids, data, report_xml, context=context, output=output) File "/opt/openerp/11069-lightbase/custom-addons-loaded/report_aeroo/report_aeroo.py", line 405, in create_aeroo_report basic = Template(source=template_io, serializer=serializer) File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 234, in __init__ encoding, lookup, allow_exec) File "/usr/local/lib/python2.7/dist-packages/Genshi-0.6-py2.7.egg/genshi/template/markup.py", line 67, in __init__ allow_exec=allow_exec) File "/usr/local/lib/python2.7/dist-packages/Genshi-0.6-py2.7.egg/genshi/template/base.py", line 406, in __init__ self._stream = self._parse(source, encoding) File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 248, in _parse styles = template._parse(self.insert_directives(styles), encoding) File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 298, in insert_directives self._handle_aeroo_tags(tree) File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 390, in _handle_aeroo_tags r_statements, closing_tags = self._aeroo_statements(tree) File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 340, in _aeroo_statements expr = statement.text[1:-1] TypeError: 'NoneType' object has no attribute '__getitem__' 2013-02-26 12:56:27,621 27445 ERROR None openerp.netsvc: 'NoneType' object has no attribute '__getitem__' (<type 'exceptions.TypeError'>, TypeError("'NoneType' object has no attribute '__getitem__'",), <traceback object at 0x7fb9d956c128>) Traceback (most recent call last): File "/opt/openerp/11069-lightbase/server/openerp/netsvc.py", line 295, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/11069-lightbase/server/openerp/service/web_services.py", line 642, in dispatch res = fn(db, uid, *params) File "/opt/openerp/11069-lightbase/server/openerp/service/web_services.py", line 748, in exp_report_get return self._check_report(report_id) File "/opt/openerp/11069-lightbase/server/openerp/service/web_services.py", line 726, in _check_report netsvc.abort_response(exc, exc.message, 'warning', exc.traceback) File "/opt/openerp/11069-lightbase/server/openerp/netsvc.py", line 72, in abort_response raise openerp.osv.osv.except_osv(description, details) except_osv: (u"'NoneType' object has no attribute '__getitem__'", (<type 'exceptions.TypeError'>, TypeError("'NoneType' object has no attribute '__getitem__'",), <traceback object at 0x7fb9d956c128>)) 2013-02-26 12:56:27,623 27445 INFO None werkzeug: 127.0.0.1 - - [26/Feb/2013 12:56:27] "POST /web/report HTTP/1.1" 500 - cheers joe Last edited by grubelnik on Fri Mar 22, 2013 12:35 pm, edited 1 time in total.
Re: openerp 7 account.invoice traceback NoneTypeHello
Ok whatever this was it has something todo with the header and footer or with the format stuff... i do not know what right now, but if i create it from the scratch it works ... even if i copy and paste all my fields into the new odt...
Re: openerp 7 account.invoice traceback NoneTypefurther research on this topic brought up the following
i changed my pc and ran into the same issue... so opening an report save it and upload it ... NOT CHANING ANYTHING... --> broken.... I found out that versions os OO are different ... i was using 3.4.1 rev 1372282 and on the other PC 3.4.0 rev 1327774 anyway now i used same version on both pcs ... but the reports keep getting screwed up when SAVINGAS .... even with no change... I also removed the antivirus software already ... i use win7 64 bit on both pcs ... i already checked java, visual studio c++ aso.... i cannot find the reason why this happens .... after analyzing the files in odt, i found that i do have changes in content.xml, meta.xml, settings.xml, styles.xml thumbnails has anyone seen this behavior ? the funniest thing is, if i create a new empty document, copy and paste all the details from the screwed report into the new one and safe it with this pc .... IT WORKS .... Please if anyone has a guess... let me know
Re: openerp 7 account.invoice traceback NoneTypeAfter examining a template file we found out that different OOo versions tend to create slightly different ODF files. In this case some of the contents of header/footer were formed differently.
The problem is that Aeroo Reports library expects correctly formed document, we'll take this into account and release a newer version with next Aeroo Reports release.
5 posts • Page 1 of 1
|
Copyright © 2001 Alistek Ltd., ALL RIGHTS RESERVED

