Repository: PokemonGoF/PokemonGo-Bot

Issue:
complete_tutorial.py appears to have issue
Using fresh clones of both master and dev. Also clean install of pgoapi. Using default config to test results in same error.

```[2017-07-18 19:25:38] Error during protoc parsing - ignored.
[2017-07-18 19:25:38] Parsing sub RPC responses...
[2017-07-18 19:25:38] Parsing class: pogoprotos.networking.responses.get_map_objects_response_pb2.get_map_objects_response
[2017-07-18 19:25:38] Generating main RPC request...
[2017-07-18 19:25:38] Incremented RPC Request ID: 5359935399462436910
[2017-07-18 19:25:38] Generating sub RPC requests...
[2017-07-18 19:25:38] Subrequest class: pogoprotos.networking.requests.messages.set_avatar_message_pb2.set_avatar_message
[2017-07-18 19:25:38] Request failed, retrying.
[2017-07-18 19:25:39] [bot_interrupted] Bot caught SIGINT. Shutting down.
[2017-07-18 19:25:39] Creating a new request...
[2017-07-18 19:25:39] Adding 'GET_INVENTORY' to RPC request
[2017-07-18 19:25:39] Generating main RPC request...
[2017-07-18 19:25:39] Incremented RPC Request ID: 7861386947506208815
[2017-07-18 19:25:39] Generating sub RPC requests...
[2017-07-18 19:25:39] Generating platform RPC requests...
[2017-07-18 19:25:39] Session Ticket still valid for further 00:29:21 hours (1500420339304 < 1500422100916)
[2017-07-18 19:25:39] Found Session Ticket - using this instead of oauth token
[2017-07-18 19:25:39] "POST /api/v137_1/hash HTTP/1.1" 200 None
[2017-07-18 19:25:39] Generated protobuf request:
status_code: 2




Discussion:
I find no mention of ToS acceptance in debug either. Spoke with @MerlionRock in discord, they seem to agree that error with complete_tutorial.py. If i disable CompleteTutorial task the bot runs just fine. My best understanding is that selecting avatar is what is failing. The log never mentions first catch sequence or setting nickname.
OK, did a complete uninstall/reinstall of python and fresh clone of master... this time the legal screen was completed but still hangs at avatar selection. Same error as above. (I was starting to think perhaps there were some conflicts with a required package so I did a clean install of python, so the issue definitely somewhere in complete_tutorial.py)
Thank you for reporting this issue. We need to look what changed in setting an avatar. Thanks for reporting and your research on this
I was thinking about this today and all I could come up with is perhaps now clothing items for purchase are in the slots the free/default clothing were previously in. Would make sense it would fail when it cannot select a store item.

Resolving patch:
diff --git a/pokemongo_bot/cell_workers/complete_tutorial.py b/pokemongo_bot/cell_workers/complete_tutorial.py
--- a/pokemongo_bot/cell_workers/complete_tutorial.py
+++ b/pokemongo_bot/cell_workers/complete_tutorial.py
@@ -119,13 +119,13 @@ def _random_avatar(self):
         # at the first choices in general, so fully
         # random on the whole avatar space is not the way to go either
         avatar['skin']=random.randint(0,3)
-        avatar['hair']=random.randint(0,3)
-        avatar['shirt']=random.randint(0,3)
-        avatar['pants']=random.randint(0,3)
-        avatar['hat']=random.randint(0,3)
-        avatar['shoes']=random.randint(0,3)
-        avatar['eyes']=random.randint(0,3)
-        avatar['backpack']=random.randint(0,3)
+        avatar['avartar_hair']=random.randint(0,3)
+        avatar['avartar_shirt']=random.randint(0,3)
+        avatar['avartar_pants']=random.randint(0,3)
+        avatar['avartar_hat']=random.randint(0,3)
+        avatar['avartar_shoes']=random.randint(0,3)
+        avatar['avartar_eyes']=random.randint(0,3)
+        avatar['avartar_backpack']=random.randint(0,3)
         return avatar
 
     def _set_avatar(self):


Test patch: