Skip to content

pbs add_tasks fails with TypeError #35

Description

@christopherthomson

Thanks for creating the pbs command line tool. I'm trying to follow the Pybossa tutorial but get a type error at the add_tasks step. It looks like one of the variables in the _pybossa_req function is returning None. I get the same result using the sample JSON file from the Pybossa tutorial, and the same result again after creating this file by running the get_images.py script.

Here is the traceback:

(pybossa-env)vagrant@vagrant-ubuntu-trusty-64:/vagrant/app-flickrperson$ pbs add_tasks --tasks-file flickr_tasks.csv --tasks-type=csv
Traceback (most recent call last):
File "/home/vagrant/pybossa-env/bin/pbs", line 11, in
sys.exit(cli())
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/click/core.py", line 488, in call
return self.main(*args, **kwargs)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/click/core.py", line 474, in main
self.invoke(ctx)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/click/core.py", line 775, in invoke
return self.invoke_subcommand(ctx, cmd, cmd_name, ctx.args[1:])
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/click/core.py", line 784, in invoke_subcommand
return cmd.invoke(cmd_ctx)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/click/core.py", line 676, in invoke
ctx.invoke(self.callback, **ctx.params)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/click/core.py", line 325, in invoke
return callback(*args, **kwargs)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/click/core.py", line 325, in invoke
return callback(*args, **kwargs)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/pbs.py", line 164, in add_tasks
res = _add_tasks(config, tasks_file, tasks_type, priority, redundancy)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/helpers.py", line 198, in _add_tasks
config.all)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/helpers.py", line 301, in find_project_by_short_name
response = pbclient.find_project(short_name=short_name, all=all)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/pbclient/init.py", line 196, in find_project
res = _pybossa_req('get', 'project', params=kwargs)
File "/home/vagrant/pybossa-env/local/lib/python2.7/site-packages/pbclient/init.py", line 37, in _pybossa_req
url = _opts['endpoint'] + '/api/' + domain
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions