Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow input specification for input names containing dots #127

Open
jeffbaumes opened this issue May 6, 2015 · 1 comment
Open

Allow input specification for input names containing dots #127

jeffbaumes opened this issue May 6, 2015 · 1 comment

Comments

@jeffbaumes
Copy link
Member

Currently we get

{
  "message":"OperationFailure: OperationFailure(u\"The dotted field 'comm.bc.dist' in 'kwargs.outputs.comm.bc.dist' is not valid for storage.\",)",
  "trace":[
    [
      "/usr/local/lib/python2.7/dist-packages/girder/api/rest.py",
      277,
      "endpointDecorator",
      "val = fun(self, args, kwargs)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/girder/api/rest.py",
      869,
      "POST",
      "return self.handleRoute(method, path, params)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/girder/api/rest.py",
      636,
      "handleRoute",
      "val = handler(**kwargs)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/girder/api/access.py",
      62,
      "accessDecorator",
      "return fun(*args, **kwargs)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/girder/api/rest.py",
      918,
      "wrapped",
      "return fn(self.ctx, *args, **kwargs)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/girder/api/rest.py",
      225,
      "wrapped",
      "return fun(*args, **kwargs)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/girder/plugins/romanesco/server/__init__.py",
      313,
      "romanescoRun",
      "job = jobModel.save(job)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/girder/models/model_base.py",
      295,
      "save",
      "document['_id'] = self.collection.save(document)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/girder/external/mongodb_proxy.py",
      65,
      "__call__",
      "return self.method(*args, **kwargs)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/pymongo/collection.py",
      288,
      "save",
      "manipulate, safe, check_keys=check_keys, **kwargs)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/pymongo/collection.py",
      552,
      "update",
      "_check_write_command_response(results)"
    ],
    [
      "/usr/local/lib/python2.7/dist-packages/pymongo/helpers.py",
      209,
      "_check_write_command_response",
      "raise OperationFailure(error.get(\"errmsg\"), error.get(\"code\"), error)"
    ]
  ],
  "type":"internal"
}
@zachmullen
Copy link
Member

I like the solution of serializing the kwargs to a string before saving it, and unserializing it when loading the job model. That way the client/server API is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants