Problem with 1.97.1??

20 views
Skip to first unread message

Jim Steil

unread,
Jun 30, 2011, 2:44:57 PM6/30/11
to web...@googlegroups.com
Hi

I have an app I've been working on and upgraded my system to 1.97.1 today.  Since then I'm getting the following with an AJAX call for json data:

Traceback (most recent call last):
  File "gluon/restricted.py", line 192, in restricted
  File "C:/dev/web2py/applications/InfoCenter/controllers/administration.py", line 862, in <module>
  File "gluon/globals.py", line 137, in <lambda>
  File "C:/dev/web2py/applications/InfoCenter/controllers/administration.py", line 17, in call
  File "gluon/tools.py", line 3918, in __call__
  File "gluon/tools.py", line 3734, in serve_json
  File "gluon/tools.py", line 3404, in universal_caller
TypeError: object of type 'NoneType' has no len()

My call from my template looks like this:

jQuery(document).ready(function(){
  jQuery("#list").jqGrid({
    url:'/InfoCenter/administration/call/json/userList',
    datatype: 'json',
    postData:{'searchText':$("#searchText").val()},
    colModel :[ {
                name:'id',
                index:'id',
                label:'ID',
                hidden:true,
            },
            {
                name:'lastFirst',
                index:'lastFirst',
                width:'50%',
                label:'Name',
            },
            {
                name:'email',
                index:'email',
                width:'50%',
                label:'Email',
            },
       
    ],
    pager: '#pager',
    rowNum:20,
    sortname: "lastFirst",
    sortorder: 'asc',
    width: 875,
    height: "100%",
    ondblClickRow: function(){
        var row_id = $("#list").getGridParam('selrow');
        window.location.href = "/InfoCenter/administration/user/" + row_id;
        return true;
    },
    caption:'',
  });
  jQuery("#list").navGrid("#pager",
          {edit:false,add:false,del:true,search:false},
          {},
          {},
          {msg:"Delete selected row(s)",
              bSubmit:"Delete",
              bCancel:"Cancel",
              url:"/InfoCenter/administration/userDelete",
              reloadAfterSubmit:true}
      );
});

This works in the 1.96.x branches by not 1.97.1.  And, it never gets to the method in the controller.  Line in administration.py is the last line of the call() method:

and line 862 doesn't exist in the controller, it ends at 861:


Any thoughts?  I'm stumped (but also pretty new to web2py).

    -Jim

José Luis Redrejo Rodríguez

unread,
Jul 1, 2011, 1:56:12 AM7/1/11
to web...@googlegroups.com
Yor're facing to a reported bug. In the bug report you can find a workaround to continue working: http://code.google.com/p/web2py/issues/detail?id=319


2011/6/30 Jim Steil <j...@qlf.com>
ghbgbjgj.png
dgagieea.png
Reply all
Reply to author
Forward
0 new messages