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

Update redundancy fails #32

Open
alexandermendes opened this issue Apr 26, 2017 · 6 comments
Open

Update redundancy fails #32

alexandermendes opened this issue Apr 26, 2017 · 6 comments

Comments

@alexandermendes
Copy link
Contributor

Hi, I might try and track this down later but there seems to be an issue when updating the task redundancy, see below:

Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\pbs.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\click\core.py", line 488, in __call__
    return self.main(*args, **kwargs)
  File "c:\python27\lib\site-packages\click\core.py", line 474, in main
    self.invoke(ctx)
  File "c:\python27\lib\site-packages\click\core.py", line 775, in invoke
    return self.invoke_subcommand(ctx, cmd, cmd_name, ctx.args[1:])
  File "c:\python27\lib\site-packages\click\core.py", line 784, in invoke_subcommand
    return cmd.invoke(cmd_ctx)
  File "c:\python27\lib\site-packages\click\core.py", line 676, in invoke
    ctx.invoke(self.callback, **ctx.params)
  File "c:\python27\lib\site-packages\click\core.py", line 325, in invoke
    return callback(*args, **kwargs)
  File "c:\python27\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "c:\python27\lib\site-packages\click\core.py", line 325, in invoke
    return callback(*args, **kwargs)
  File "c:\python27\lib\site-packages\pbs.py", line 193, in update_task_redundancy
    res = _update_tasks_redundancy(config, task_id, redundancy)
  File "c:\python27\lib\site-packages\helpers.py", line 252, in _update_tasks_redundancy
    check_api_error(response)
  File "c:\python27\lib\site-packages\helpers.py", line 290, in check_api_error
    error=api_response)
pbsexceptions.TaskNotFound: ('PyBossa Task not found', {u'status': u'failed', u'target': u'task', u'exception_msg': u'Reserved keys in payload', u'status_code': 400, u'exception_cls': u'BadRequest', u'action': u'PUT'})
@alexandermendes
Copy link
Contributor Author

Oh and that's just after creating the project, adding tasks, then throws the above when updating redundancy

@teleyinex
Copy link
Member

Interesting. We're updating the tasks redundancy without problems so far. Can you share the post that you are doing? It looks like some private reserved keys are in the payload.

@teleyinex
Copy link
Member

Forget about my previous post. I thought this was in pbclient. We need to double check it, as pbs might be sending reserved keys in its payload.

@teleyinex
Copy link
Member

So, [this is](https://github.com/Scifabric/pbs/blob/master/helpers.py#L233 where we update the task n_answers. In principle is using pbclient so it should be fine. I'll try to debug this asap.

@alexandermendes
Copy link
Contributor Author

It looks like this is probably explained by #36!

@alexandermendes
Copy link
Contributor Author

Oh, nope, got ahead of myself there - it's probably a different error.

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