← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 857836] Re: [6.0.4] 'NoneType' object is not iterable

 

http://bazaar.launchpad.net/~openerp/openobject-client-
web/6.0/revision/4710

** Branch linked: lp:~openerp-dev/openobject-client-
web/6.0-opw-17058-cpa

** Changed in: openobject-client-web
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/857836

Title:
  [6.0.4] 'NoneType' object is not iterable

Status in OpenERP Web Client:
  Fix Released

Bug description:
  Using 6.0 branches, I get this message when I click on any report:

  <type 'exceptions.TypeError'>	Python 2.6.5: /home/openerp-dev/openerp-virt/bin/python
  Fri Sep 23 18:34:14 2011

  A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
   /home/openerp-dev/openerp-virt/lib/python2.6/site-packages/cherrypy/_cprequest.py in respond(self=<cherrypy._cprequest.Request object>, path_info='/openerp/form/action')
    604                     if self.handler:
    605                         self.stage = 'handler'
    606                         cherrypy.response.body = self.handler()
    607                     
    608                     self.stage = 'before_finalize'
  global cherrypy = <module 'cherrypy' from '/home/openerp-dev/opene...b/python2.6/site-packages/cherrypy/__init__.pyc'>, cherrypy.response = <cherrypy._ThreadLocalProxy object>, cherrypy.response.body = [], self = <cherrypy._cprequest.Request object>, self.handler = <cherrypy._cpdispatch.LateParamPageHandler object>
   /home/openerp-dev/openerp-virt/lib/python2.6/site-packages/cherrypy/_cpdispatch.py in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object>)
     23     def __call__(self):
     24         try:
     25             return self.callable(*self.args, **self.kwargs)
     26         except TypeError, x:
     27             test_callable_spec(self.callable, self.args, self.kwargs)
  self = <cherrypy._cpdispatch.LateParamPageHandler object>, self.callable = <bound method Root.default of <openobject.controllers._root.Root object>>, self.args = ('openerp', 'form', 'action'), self.kwargs = {'_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'}
   /home/openerp-dev/openerp/openobject-client-web/openobject/tools/_expose.py in func_wrapper(*args=(<openobject.controllers._root.Root object>, 'openerp', 'form', 'action'), **kw={'_': '1316817010802', '_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'})
    180                 raise cherrypy.HTTPError(405)
    181 
    182             res = func(*args, **kw)
    183             if format == 'json' or (allow_json and 'allow_json' in cherrypy.request.params):
    184                 cherrypy.response.headers['Content-Type'] = 'text/javascript'
  global res = '/home/openerp-dev/openerp/openobject-client-web/...view_calendar/controllers/templates/calpopup.mako', func = <function default>, args = (<openobject.controllers._root.Root object>, 'openerp', 'form', 'action'), kw = {'_': '1316817010802', '_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'}
   /home/openerp-dev/openerp/openobject-client-web/openobject/controllers/_root.py in default(self=<openobject.controllers._root.Root object>, *args=('openerp', 'form', 'action'), **kw={'_': '1316817010802', '_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'})
     88             request.handler = cherrypy.NotFound()
     89 
     90         return request.handler()
     91 
     92     def find_handler(self):
  request = <cherrypy._ThreadLocalProxy object>, request.handler = <cherrypy._cpdispatch.LateParamPageHandler object>
   /home/openerp-dev/openerp-virt/lib/python2.6/site-packages/cherrypy/_cpdispatch.py in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object>)
     23     def __call__(self):
     24         try:
     25             return self.callable(*self.args, **self.kwargs)
     26         except TypeError, x:
     27             test_callable_spec(self.callable, self.args, self.kwargs)
  self = <cherrypy._cpdispatch.LateParamPageHandler object>, self.callable = <function action>, self.args = (), self.kwargs = {'_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'}
   /home/openerp-dev/openerp/openobject-client-web/addons/openerp/controllers/utils.py in wrapper(*args=(), **kw={'_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'})
    110             # User is logged in; allow access
    111             clear_login_fields(kw)
    112             return fn(*args, **kw)
    113         else:
    114             action = kw.get('login_action', '')
  fn = <bound method Form.action of <openerp.controllers.form.Form object>>, args = (), kw = {'_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'}
   /home/openerp-dev/openerp/openobject-client-web/openobject/tools/_expose.py in func_wrapper(*args=(<openerp.controllers.form.Form object>,), **kw={'_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'})
    180                 raise cherrypy.HTTPError(405)
    181 
    182             res = func(*args, **kw)
    183             if format == 'json' or (allow_json and 'allow_json' in cherrypy.request.params):
    184                 cherrypy.response.headers['Content-Type'] = 'text/javascript'
  global res = '/home/openerp-dev/openerp/openobject-client-web/...view_calendar/controllers/templates/calpopup.mako', func = <function action>, args = (<openerp.controllers.form.Form object>,), kw = {'_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'}
   /home/openerp-dev/openerp/openobject-client-web/addons/openerp/controllers/form.py in action(self=<openerp.controllers.form.Form object>, **kw={'_terp_action': '383', '_terp_id': '8', '_terp_model': 'mgmtsystem.audit'})
   1004         action['form_context'] = context or {}
   1005         import actions
   1006         return actions.execute(action, model=params.model, id=id, ids=ids, report_type='pdf', context_menu=context_menu)
   1007 
   1008     @expose()
  actions = <module 'openerp.controllers.actions' from '/hom...lient-web/addons/openerp/controllers/actions.py'>, actions.execute = <function execute>, action = {'attachment': False, 'attachment_use': False, 'auto': False, 'form_context': {}, 'groups_id': [], 'header': True, 'id': 383, 'model': u'mgmtsystem.audit', 'multi': False, 'name': u'Print Report', ...}, model undefined, params = {'_terp_id': 8, '_terp_action': 383, '_terp_model': 'mgmtsystem.audit'}, params.model = 'mgmtsystem.audit', id = 8, ids = [8], report_type undefined, context_menu = None
   /home/openerp-dev/openerp/openobject-client-web/addons/openerp/controllers/actions.py in execute(action={'attachment': False, 'attachment_use': False, 'auto': False, 'form_context': {}, 'groups_id': [], 'header': True, 'id': 383, 'model': u'mgmtsystem.audit', 'multi': False, 'name': u'Print Report', ...}, **data={'context': {}, 'context_menu': None, 'id': 8, 'ids': [8], 'model': 'mgmtsystem.audit', 'report_type': 'pdf'})
    391 
    392     import pdb;pdb.set_trace()
    393     data.setdefault('context', {}).update(expr_eval(action.get('form_context', '{}') or action.get('context'), data.get('context', {})))
    394 
    395     action_executor = ACTIONS_BY_TYPE[action['type']]
  data = {'context': {}, 'context_menu': None, 'id': 8, 'ids': [8], 'model': 'mgmtsystem.audit', 'report_type': 'pdf'}, data.setdefault = <built-in method setdefault of dict object>, ).update undefined, global expr_eval = <function expr_eval>, action = {'attachment': False, 'attachment_use': False, 'auto': False, 'form_context': {}, 'groups_id': [], 'header': True, 'id': 383, 'model': u'mgmtsystem.audit', 'multi': False, 'name': u'Print Report', ...}, action.get = <built-in method get of dict object>, data.get = <built-in method get of dict object>

  <type 'exceptions.TypeError'>: 'NoneType' object is not iterable
        args = ("'NoneType' object is not iterable",)
        message = "'NoneType' object is not iterable" 

  
  I used pdb to discover that:
  * action.get('form_context', '{}')
  * action.get('context')
  * data.get('context', {})

  are all empty at line 392 of addons/openerp/controllers/actions.py

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client-web/+bug/857836/+subscriptions


References