PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

TypeError: call() takes exactly 1 argument (2 given)

Open ebbrey opened this issue 10 years ago • 5 comments

  1. Have you validated that your config.json is valid JSON?

Valid JSON

  1. Have you [searched our issue tracker](https://github.com/PokemonGoF/PokemonGo-Bot/issues?

Commented on issue, but was already closed.

  1. Are you running on the master branch?

Running DEV

  1. All Issue sections MUST be completed to help us determine the actual problem and find its cause -->

    Expected Behavior

    Start bot without crash after load .dll

Actual Behavior

Crashes even after updating to latest Pgoapi (pip install -r requirements.txt --upgrade)

Your FULL config.json (remove your username, password, gmapkey and any other private info)

{ "auth_service": "ptc", "username": "", "password": "****", "location": "", "gmapkey": "*****", "libencrypt_location": "", "websocket_server": false, "heartbeat_threshold": 10, "tasks": [ { "type": "HandleSoftBan" }, { "type": "SleepSchedule", "config": { "enabled": true, "time": "23:56", "duration":"7:46", "time_random_offset": "00:18", "duration_random_offset": "00:36" } }, { "type": "RandomPause", "config": { "enabled": false, "min_duration": "00:00:10", "max_duration": "00:11:00", "min_interval": "00:10:00", "max_interval": "03:00:00" } }, { "type": "NicknamePokemon", "config": { "enabled": true, "nickname_template": "{name:.7s}{attack_pct1}{defense_pct1}_{iv_pct2}" } }, { "type": "CollectLevelUpReward" }, { "type": "IncubateEggs", "config": { "longer_eggs_first": true } }, { "type": "UpdateLiveStats", "config": { "enabled": true, "min_interval": 10, "stats": ["username", "uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"], "terminal_log": true, "terminal_title": true } }, { "type": "UpdateLiveInventory", "config": { "enabled": true, "min_interval": 120, "show_all_multiple_lines": false, "items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"] } }, { "type": "TransferPokemon", "config": { "transfer_wait_min": 1, "transfer_wait_max": 4 } }, { "type": "RecycleItems", "config": { "min_empty_space": 15, "max_balls_keep": 150, "max_potions_keep": 30, "max_berries_keep": 50, "max_revives_keep": 20, "item_filter": { "Pokeball": { "keep" : 50 }, "Potion": { "keep" : 10 }, "Super Potion": { "keep" : 10 }, "Hyper Potion": { "keep" : 15 }, "Revive": { "keep" : 20 }, "Razz Berry": { "keep" : 50 } }, "recycle_wait_min": 1, "recycle_wait_max": 4 } }, { "type": "CatchPokemon", "config": { "catch_visible_pokemon": true, "catch_lured_pokemon": true, "min_ultraball_to_keep": 5, "berry_threshold": 0.4, "vip_berry_threshold": 0.92, "catch_throw_parameters": { "excellent_rate": 0.1, "great_rate": 0.5, "nice_rate": 0.3, "normal_rate": 0.1, "spin_success_rate" : 0.6 }, "catch_simulation": { "flee_count": 4, "flee_duration": 2, "catch_wait_min": 2, "catch_wait_max": 5, "berry_wait_min": 2, "berry_wait_max": 3, "changeball_wait_min": 2, "changeball_wait_max": 3 } } }, { "type": "SpinFort", "config": { "spin_wait_min": 2, "spin_wait_max": 3 } }, { "type": "MoveToMapPokemon", "config": { "address": "http://localhost:5000", "max_distance": 1000, "min_ball": 50, "prioritize_vips": true, "snipe": false, "snipe_high_prio_only": false, "snipe_high_prio_threshold": 400, "update_map": false, "mode": "priority", "map_path": "raw_data", "walker": "StepWalker", "catch": { "==========Legendaries==========": 0, "Aerodactyl": 1000, "Snorlax": 1000, "Articuno": 1000, "Zapdos": 1000, "Moltres": 1000, "Dratini": 1000, "Dragonair": 1000, "Dragonite": 1000, "Mewtwo": 1000, "Mew": 1000,

        "==========Region Locked==========": 0,
        "Farfetch'd": 1000,
        "Kangaskhan": 1000,
        "Mr. Mime": 1000,
        "Tauros": 1000,

        "==========Very Rare==========": 0,
        "Lapras": 900,
        "Electabuzz": 900,
        "Magmar": 900,
        "Ditto": 900,

        "==========Starters==========": 0,
        "Bulbasaur": 400,
        "Ivysaur": 600,
        "Venusaur": 1000,

        "Charmander": 400,
        "Charmeleon": 600,
        "Charizard": 1000,

        "Squirtle": 400,
        "Wartortle": 600,
        "Blastoise": 1000,

        "Pikachu": 600,
        "Raichu": 1000,

        "==========Semi Rare==========": 0,
        "Porygon": 200,
        "Scyther": 200,
        "Jynx": 200,

        "==========Uncommon==========": 0,

        "Omanyte": 150,
        "Omastar": 500,

        "Seel": 300,
        "Dewgong": 500,

        "Grimer": 200,
        "Muk": 500,

        "Shellder": 200,
        "Cloyster": 500,

        "Gastly": 200,
        "Haunter": 500,
        "Gengar": 1000,

        "Onix": 600,

        "Drowzee": 200,

        "Hypno": 600,

        "Vulpix": 200,
        "Ninetales": 600,

        "Paras": 100,
        "Parasect": 500,

        "Growlithe": 200,
        "Arcanine": 700,

        "Tentacool": 200,
        "Tentacruel": 500,

        "Mankey": 150,
        "Primeape": 500,

        "Clefairy": 150,
        "Clefable": 500,

        "Jigglypuff": 150,
        "Wigglytuff": 500,

        "Venonat": 100,
        "Venomoth": 500,

        "Diglett": 200,
        "Dugtrio": 500,

        "Meowth": 250,
        "Persian": 500,

        "Psyduck": 150,
        "Golduck": 500,

        "Geodude": 100,
        "Graveler": 500,
        "Golem": 800,

        "Eevee": 200,
        "Vaporeon": 800,
        "Jolteon": 800,
        "Flareon": 800,

        "Kabuto": 150,
        "Kabutops": 500,

        "Magikarp": 150,
        "Gyarados": 800,

        "Pinsir": 150,

        "Ponyta": 200,
        "Rapidash": 500,

        "Slowpoke": 200,
        "Slowbro": 500,

        "Magnemite": 250,
        "Magneton": 500,

        "Krabby": 100,
        "Kingler": 500,

        "Voltorb": 200,
        "Electrode": 500,

        "Exeggcute": 250,
        "Exeggcutor": 500,

        "Cubone": 300,
        "Marowak": 800,

        "Hitmonlee": 400,

        "Hitmonchan": 400,

        "Lickitung": 500,

        "Koffing": 200,
        "Weezing": 500,

        "Rhyhorn": 200,
        "Rhydon": 500,

        "Chansey": 800,

        "Tangela": 300,

        "Horsea": 200,
        "Seadra": 600,

        "Goldeen": 150,
        "Seaking": 500,

        "Staryu": 200,
        "Starmie": 800,


        "==========T1 Evolvers==========": 0,
        "Caterpie": 10,
        "Metapod": 10,
        "Butterfree": 500,

        "Weedle": 10,
        "Kakuna": 10,
        "Beedrill": 500,

        "Pidgey": 10,
        "Pidgeotto": 10,
        "Pidgeot": 300,

        "==========T2 Evolvers==========": 0,
        "Nidoran F": 10,
        "Nidorina": 10,
        "Nidoqueen": 10,

        "Nidoran M": 10,
        "Nidorino": 10,
        "Nidoking": 10,

        "Oddish": 100,
        "Gloom": 200,
        "Vileplume": 600,

        "Poliwag": 200,
        "Poliwhirl": 400,
        "Poliwrath": 800,

        "Abra": 300,
        "Kadabra": 600,
        "Alakazam": 800,

        "Machop": 150,
        "Machoke": 400,
        "Machamp": 800,

        "Bellsprout": 100,
        "Weepinbell": 400,
        "Victreebel": 800,

        "==========Trash==========": 0,

        "Rattata": 10,
        "Raticate": 10,

        "Spearow": 10,
        "Fearow": 10,

        "Ekans": 10,
        "Arbok": 10,

        "Sandshrew": 10,
        "Sandslash": 10,

        "Zubat": 10,
        "Golbat": 10,

        "Doduo": 10,
        "Dodrio": 10
      }
    }
  },
  {
    "type": "MoveToFort",
    "config": {
        "lure_attraction": true,
        "lure_max_distance": 2000
    }
  },
  {
    "type": "FollowSpiral",
    "config": {
      "diameter": 4,
      "step_size": 70
    }
  }
],
"map_object_cache_time": 5,
"forts": {
  "avoid_circles": true,
  "max_circle_size": 50,
  "cache_recent_forts": true
},
"pokemon_bag": {
  "// if 'show_at_start' is true, it will log all the pokemons in the bag (not eggs) at bot start": {},
  "show_at_start": true,
  "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {},
  "show_count": false,
  "// 'pokemon_info' parameter define which info to show for each pokemon": {},
  "// the available options are": {},
  "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {},
  "pokemon_info": ["cp", "iv_pct"]
},
"walk_max": 9,
"walk_min": 6,
"alt_min": 10,
"alt_max": 100,
"debug": false,
"test": false,
"health_record": true,
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"logging_color": true,
"daily_catch_limit": 800, 
"catch": {
  "any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
  "// Example of always catching Rattata:": {},
  "// Rattata": { "always_catch" : true }
},
"release": {
  "any": {"release_below_cp": 100, "release_below_iv": 0.8, "logic": "or", "keep_best_iv": 2 }
},
"vips" : {
     "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
    "any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
    "Lapras": {},
    "Moltres": {},
    "Zapdos": {},
    "Articuno": {},

    "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
    "Mewtwo": {},
    "Dragonite": {},
    "Snorlax": {},
    "// Mew evolves to Mewtwo": {},
    "Mew": {},
    "Arcanine": {},
    "Vaporeon": {},
    "Gyarados": {},
    "Exeggutor": {},
    "Muk": {},
    "Weezing": {},
    "Dratini": {},
    "Flareon": {}
}

}

Output when issue occurred

2016-08-20 16:26:38,036 [PokemonGoBot] [INFO] Found encrypt_64.dll! Platform: win32 encrypt_64.dll directory: C:\Python27\PokemonGo-Bot 2016-08-20 16:26:38,039 [PokemonGoBot] [INFO] Traceback (most recent call last): File "pokecli.py", line 674, in main() File "pokecli.py", line 176, in main report_summary(bot) File "pokecli.py", line 211, in report_summary metrics.capture_stats() File "C:\Python27\PokemonGo-Bot\pokemongo_bot\metrics.py", line 84, in capture_stats response_dict = request.call() File "C:\Python27\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 233, in call result = self._call() File "C:\Python27\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 182, in _call return PGoApiRequest.call(self, signature) TypeError: call() takes exactly 1 argument (2 given) 2016-08-20 16:26:38,075 [sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (url: https://app.getsentry.com/api/90254/store/) Traceback (most recent call last): File "c:\python27\lib\site-packages\raven\transport\threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "c:\python27\lib\site-packages\raven\transport\http.py", line 47, in send ca_certs=self.ca_certs, File "c:\python27\lib\site-packages\raven\utils\http.py", line 66, in urlopen return opener.open(url, data, timeout) File "c:\python27\lib\site-packages\future\backports\urllib\request.py", line 494, in open response = self._open(req, data) File "c:\python27\lib\site-packages\future\backports\urllib\request.py", line 512, in _open '_open', req) File "c:\python27\lib\site-packages\future\backports\urllib\request.py", line 466, in _call_chain result = func(*args) File "c:\python27\lib\site-packages\raven\utils\http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "c:\python27\lib\site-packages\future\backports\urllib\request.py", line 1284, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "c:\python27\lib\httplib.py", line 1057, in request self._send_request(method, url, body, headers) File "c:\python27\lib\httplib.py", line 1097, in _send_request self.endheaders(body) File "c:\python27\lib\httplib.py", line 1053, in endheaders self._send_output(message_body) File "c:\python27\lib\httplib.py", line 895, in _send_output msg += message_body File "c:\python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte 2016-08-20 16:26:38,119 [sentry.errors.uncaught] [ERROR] [u'TypeError: call() takes exactly 1 argument (2 given)', u' File "pokecli.py", line 674, in ', u' File "pokecli.py", line 176, in main', u' File "pokecli.py", line 211, in report_summary', u' File "C:\Python27\PokemonGo-Bot\pokemongo_bot\metrics.py", line 84, in capture_stats', u' File "C:\Python27\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 233, in call', u' File "C:\Python27\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 182, in _call']

Steps to Reproduce

Start the bot with the latest DEV.

Other Information

OS: WIn10

Branch: Dev

Git Commit: 5eef8d65d6c613f6aa3d15c444ff29651df6b955

Python Version: Python 2.7.12

ebbrey avatar Aug 20 '16 14:08 ebbrey

Have also updated to include upto #4344. Same error.

ebbrey avatar Aug 20 '16 14:08 ebbrey

Thanks for your reply. Tried the Windows steps.

Removed "PokemonGo-Bot\src" pgoapi folder Removed C:\Python27\Lib\site-packages pgoapi and pgoapi-1.1.6-py2.7.egg-info

pip install -r requirements.txt --upgrade

Run bot.

Getting the exact same error.

New .dll needed for the new api?

ebbrey avatar Aug 20 '16 15:08 ebbrey

didn't help, still same

bohus-rosko avatar Aug 20 '16 18:08 bohus-rosko

Still have the same issue. If i use the latest updates... and just use a plain latest example config: 2016-08-21 16:15:45,936 [PokemonGoBot] [INFO] Found encrypt_64.dll! Platform: win32 encrypt_64.dll directory: C:\Python27\PokemonGo-Bot 2016-08-21 16:15:45,940 [PokemonGoBot] [INFO] Traceback (most recent call last): File "C:\Python27\PokemonGo-Bot\pokecli.py", line 677, in main() File "C:\Python27\PokemonGo-Bot\pokecli.py", line 176, in main report_summary(bot) File "C:\Python27\PokemonGo-Bot\pokecli.py", line 211, in report_summary metrics.capture_stats() File "C:\Python27\PokemonGo-Bot\pokemongo_bot\metrics.py", line 96, in capture_stats response_dict = request.call() File "C:\Python27\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 233, in call result = self._call() File "C:\Python27\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 182, in _call return PGoApiRequest.call(self, signature) TypeError: call() takes exactly 1 argument (2 given)

ebbrey avatar Aug 21 '16 14:08 ebbrey

@cbogithub solution is the correct one. I kept deleting the site-packages pgo and pgo...egg in my python/lib/site-packages and reinstalled dependencies with pip install -r requirements.txt until it said 1.1.8 api installed. Not 1.1.6 as it kept installing.

ebbrey avatar Aug 21 '16 15:08 ebbrey