_ translate function blows up if used in method with a parameter named 'args': AttributeError: 'list' object has no attribute 'get' in lang = args[-1].get('lang',False)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP's Framework R&D |
Bug Description
Hello,
since some 1 week and 3 weeks at the very max, when using openerp-server 5.0 head revisions, I have this error when I try to connect me to the server:
No LSB modules are available.
[2009-11-23 20:19:35,840] ERROR:web-
[2009-11-23 20:19:35,840] ERROR:web-
[2009-11-23 20:19:35,840] ERROR:web-
[2009-11-23 20:19:35,840] ERROR:web-
[2009-11-23 20:19:35,840] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,841] ERROR:web-
[2009-11-23 20:19:35,842] ERROR:web-
[2009-11-23 20:19:35,842] ERROR:web-
[2009-11-23 20:19:35,842] ERROR:web-
[2009-11-23 20:19:35,842] ERROR:web-
[2009-11-23 20:19:35,842] ERROR:web-
[2009-11-23 20:19:35,842] ERROR:web-
[2009-11-23 20:19:35,842] ERROR:web-
[2009-11-23 20:19:35,842] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,843] ERROR:web-
[2009-11-23 20:19:35,844] ERROR:web-
I use to make it start and see no bug with the following patch:
=== modified file 'bin/tools/
--- bin/tools/
+++ bin/tools/
@@ -135,7 +135,7 @@
if not (cr and lang):
args = frame.f_
- if args:
+ if args and type(args[-1]) == dict:
if frame.f_
HOWEVER, I MIGHT NOT HAVE TESTED ALL THE FEATURES AND CONSIDER THAT A UGLY WORKAROUND. SO PLEASE DON'T JUST COMMIT THAT PATCH WITHOUT FINDING THE REAL BUG CAUSE/REAL SOLUTION.
Hope this helps
Changed in openobject-server: | |
status: | Invalid → Confirmed |
importance: | Undecided → Wishlist |
Changed in openobject-server: | |
importance: | Wishlist → Medium |
summary: |
- 5.0 regression: AttributeError: 'list' object has no attribute 'get' in - lang = args[-1].get('lang',False) + _ translate function blows up if used in method with a parameter named + 'arg': AttributeError: 'list' object has no attribute 'get' in lang = + args[-1].get('lang',False) |
summary: |
_ translate function blows up if used in method with a parameter named - 'arg': AttributeError: 'list' object has no attribute 'get' in lang = + 'args': AttributeError: 'list' object has no attribute 'get' in lang = args[-1].get('lang',False) |
Changed in openobject-server: | |
assignee: | nobody → Anup (Open ERP) (ach-openerp) |
status: | Confirmed → In Progress |
Changed in openobject-server: | |
assignee: | Anup (OpenERP) (ach-openerp) → OpenERP's Framework R&D (openerp-dev-framework) |
Hello Raphael,
Can you please tell us when do you get this error ?. And I would like to request you to debug it and print args[-1] what it actually comes. Generally, it is a dictionary which is the argument to the method so please notify us about the thing.
Thank you.