cannot concatenate 'str' and 'NoneType' objects

Author: yathiCreated Sep 15, 2016Updated Jan 15, 2021

I am trying to get the bees to attack. This is my first time using them. When I run :

bees.attack('myurlhere', 2, 2)

I get:

Traceback (most recent call last):
  File "beesTest.py", line 43, in <module>
    bees.attack('https://api.rewardops.net/api/v4/auth/token', 2, 2)
  File "/Library/Python/2.7/site-packages/beeswithmachineguns/bees.py", line 673, in attack
    username, key_name, zone, instance_ids = _read_server_list(options.get('zone'))
  File "/Library/Python/2.7/site-packages/beeswithmachineguns/bees.py", line 69, in _read_server_list
    MR_STATE_FILENAME = _get_new_state_file_name(mr_zone[-1])
  File "/Library/Python/2.7/site-packages/beeswithmachineguns/bees.py", line 1267, in _get_new_state_file_name
    return STATE_FILENAME+'.'+zone
TypeError: cannot concatenate 'str' and 'NoneType' objects

I also tried providing an options where the option looks like : {u'post_file': u'data.json', u'contenttype': u'application/json'} and then I do the attack with:

bees.attack('myurlhere', 2,2, **options)

But that also gives me the same error.

I am on:

  • Mac OSX 10.11.16
  • Python 2.7.10

I installed bees using pip install git+git://github.com/newsapps/beeswithmachineguns.git

Source: newsapps/beeswithmachineguns