Repository: PokemonGoF/PokemonGo-Bot

Issue:
[CollectLevelUpReward] outputting Array instead of clean list of rewards.
<!--

STOP ! ! !

Read the following before creating anything (or you will have your issue/feature request closed without notice)

1. Please only create an ISSUE or a FEATURE REQUEST - don't mix the two together in one item
2. For a Feature Request please only fill out the FEATURE REQUEST section
3. For a Issue please only fill out the ISSUE section
4. Issues are NOT to be used for help/config problems/support - use the relevant slack channels as per the README
5. Provide a good summary in the title, don't just write problem, or awesome idea!
6. Delete all irrelevant sections not related to your issue/feature request (including this top section)

===============ISSUE SECTION===============

Before you create an Issue, please check the following:

1. Have you validated that your config.json is valid JSON? Use http://jsonlint.com/ to check.
2. Have you [searched our issue tracker](https://github.com/PokemonGoF/PokemonGo-Bot/issues?q=is%3Aissue+sort%3Aupdated-desc) to see if the issue already exists? If so, comment on that issue instead rather than creating a new issue.
3. Are you running on the `master` branch? We work on the `dev` branch and then add that functionality to `master` when it is stable. Your issue may be fixed on `dev` and there is no need for this issue, just wait and it will eventually be merged to `master`.
4. All Issue sections MUST be completed to help us determine the actual problem and find its cause
-->
### Expected Behavior

<!-- Tell us what you expect to happen -->

When leveling up, it should output a list of items rewarded in a clean manner.
### Actual Behavior

<!-- Tell us what is happening -->

When leveling up, it outputs an Array with the items rewarded.
### Your FULL config.json (remove your username, password, gmapkey and any other private info)

<!-- Provide your FULL config file, feel free to use services such as pastebin.com to reduce clutter -->

http://pastebin.com/RyhMpXrq
### Output when issue occurred

<!-- Provide a reasonable sample from your output log (not just the error message), feel free to use services such as pastebin.com to reduce clutter -->

[CollectLevelUpReward] [INFO] [level_up_reward] Received level up reward: [{'item_id': 3, 'name': u'Ultraball', 'item_count': 15}, {'item_id': 103, 'name': u'Hyper Potion', 'item_count': 10}, {'item_id': 201, 'name': u'Revive', 'item_count': 10}, {'item_id': 701, 'name': u'Razz Berry', 'item_count': 10}]
### Steps to Reproduce

<!-- Tell us the steps you have taken to reproduce the issue -->

1.) Run bot.
2.) Level up your character.
### Other Information

OS: OSX

<!-- Tell us what Operating system you're using --> 

Branch: master

<!-- dev or master --> 

Git Commit: 42d670a411b4f8dc9a6206dd10a88cc51744026d

<!-- run 'git log -n 1 --pretty=format:"%H"' --> 

Python Version: 2.7.10

<!-- run 'python -V' and paste it here) --> 

Any other relevant files/configs (eg: path files) 

<!-- Anything else which may be of relevance -->

<!-- ===============END OF ISSUE SECTION=============== -->



Discussion:

Resolving patch:
diff --git a/pokemongo_bot/cell_workers/collect_level_up_reward.py b/pokemongo_bot/cell_workers/collect_level_up_reward.py
--- a/pokemongo_bot/cell_workers/collect_level_up_reward.py
+++ b/pokemongo_bot/cell_workers/collect_level_up_reward.py
@@ -67,6 +67,6 @@ def _collect_level_reward(self):
                 'level_up_reward',
                 formatted='Received level up reward: {items}',
                 data={
-                    'items': data
+                    'items': ', '.join(["{}x {}".format(data[x], x) for x in data])
                 }
             )
diff --git a/pokemongo_bot/cell_workers/spin_fort.py b/pokemongo_bot/cell_workers/spin_fort.py
--- a/pokemongo_bot/cell_workers/spin_fort.py
+++ b/pokemongo_bot/cell_workers/spin_fort.py
@@ -80,7 +80,7 @@ def work(self):
                         data={
                             'pokestop': fort_name,
                             'exp': experience_awarded,
-                            'items': items_awarded
+                            'items': ', '.join(["{}x {}".format(items_awarded[x], x) for x in items_awarded])
                         }
                     )
                 else:


Test patch: