The bug is at:
gluon/tools.py
s = methods[method](**params)
it should be
s = methods[method](*params)
On Sat, Mar 2, 2013 at 12:16 AM, Phyo Arkar <[email protected]>wrote:
> We got a problem when we upgrade to 2.3.2 in JSONRPC called via qooxdoo.
>
> "TypeError: testlogin() argument after ** must be a mapping, not list",
> "JSONRPCError"
>
>
> Which worked fine in 2.2.1
>
>
> Below is code for controller :
>
>
>
> @service.jsonrpc
> def testlogin(username, password):
>
> status = 0
> authed = auth.login_bare(str(username), str(password))
>
>
> if authed:
> status = 1
> return dict(status=status)
>
>
>
>
>
> JSONRPC request code is :
>
> jsonrpc_login.callAsync(handler_login,
>
> "testlogin",
> textbox_username.getValue(),
> textbox_password.getValue());
>
>
>
>
> Full JS Code (qooxdoo) :
>
> qx.Class.define("logintest.login", {
> extend: qx.ui.container.Composite,
>
>
> construct : function() {
> this.base(arguments);
> this.setLayout(new qx.ui.layout.VBox());
> var center_hbox = new qx.ui.container.Composite(new
> qx.ui.layout.HBox());
>
>
> var loginform = new qx.ui.form.Form();
> var textbox_username = new qx.ui.form.TextField();
> var textbox_password = new qx.ui.form.PasswordField();
>
>
> var button_login = new qx.ui.form.Button("Login",
> "logintest/test.png");
>
> loginform.add(textbox_username, "User Name");
> loginform.add(textbox_password, "Password");
>
> loginform.addButton(button_login);
>
> var jsonrpc_login = new
> qx.io.remote.Rpc("/auth_test/default/call/jsonrpc");
>
> center_hbox.add(new qx.ui.core.Spacer(), {flex: 1});
>
> center_hbox.add(new qx.ui.form.renderer.Single(loginform));
> center_hbox.add(new qx.ui.core.Spacer(), {flex: 1});
>
> this.add(new qx.ui.core.Spacer(), {flex: 1});
>
> this.add(center_hbox);
> this.add(new qx.ui.core.Spacer(), {flex: 1});
>
> var handler_login = function(result, ex, id)
> {
> if (ex == null)
>
> {
> alert(result.status);
> } else {
> console.log("=Err=");
> console.log(ex);
> }
>
> };
>
> button_login.addListener("execute", function(e) {
> jsonrpc_login.callAsync(handler_login,
> "testlogin",
>
> textbox_username.getValue(),
> textbox_password.getValue());
> });
> },
>
>
> members : {
>
> }
> });
>
>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.