Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x #2

Closed
into opened this issue Jul 21, 2016 · 0 comments
Closed

x #2

into opened this issue Jul 21, 2016 · 0 comments

Comments

@into
Copy link

into commented Jul 21, 2016

x

@into into changed the title Errors x Jul 21, 2016
@into into closed this as completed Jul 21, 2016
eggins pushed a commit that referenced this issue Jul 21, 2016
Merge Main into my project
douglascamata added a commit that referenced this issue Jul 22, 2016
douglascamata pushed a commit that referenced this issue Jul 22, 2016
updated cli colours and added some more logging text for user experience
solderzzc pushed a commit that referenced this issue Jul 23, 2016
solderzzc pushed a commit that referenced this issue Jul 23, 2016
solderzzc pushed a commit that referenced this issue Jul 25, 2016
* Fixed sleep to use floats again

* Fixed sleep to use floats again #2
eggins pushed a commit that referenced this issue Jul 25, 2016
* Fixed sleep to use floats again

* Fixed sleep to use floats again #2

* Refactored jitter to have its own function to be used elsewhere

* Fixes SpiralNavigation skipping waypoints

* Fixing stationary movements
fredrik-hellmangroup pushed a commit that referenced this issue Jul 25, 2016
* Fixed sleep to use floats again

* Fixed sleep to use floats again #2

* Refactored jitter to have its own function to be used elsewhere

* Fixes SpiralNavigation skipping waypoints

* Fixing stationary movements

* Improved StepWalker
(distances lower than speed should be walked directly)
solderzzc pushed a commit that referenced this issue Jul 26, 2016
* Fixed sleep to use floats again

* Fixed sleep to use floats again #2

* Refactored jitter to have its own function to be used elsewhere

* Fixes SpiralNavigation skipping waypoints

* Fixing stationary movements

* Improved StepWalker
(distances lower than speed should be walked directly)

* Fixes error on missing IV values
fredrik-hellmangroup pushed a commit that referenced this issue Jul 27, 2016
MFizz pushed a commit to MFizz/PokemonGo-Bot that referenced this issue Jul 29, 2016
* Fixed sleep to use floats again

* Fixed sleep to use floats again PokemonGoF#2
MFizz pushed a commit to MFizz/PokemonGo-Bot that referenced this issue Jul 29, 2016
* Fixed sleep to use floats again

* Fixed sleep to use floats again PokemonGoF#2

* Refactored jitter to have its own function to be used elsewhere

* Fixes SpiralNavigation skipping waypoints

* Fixing stationary movements
MFizz pushed a commit to MFizz/PokemonGo-Bot that referenced this issue Jul 29, 2016
* Fixed sleep to use floats again

* Fixed sleep to use floats again PokemonGoF#2

* Refactored jitter to have its own function to be used elsewhere

* Fixes SpiralNavigation skipping waypoints

* Fixing stationary movements

* Improved StepWalker
(distances lower than speed should be walked directly)
MFizz pushed a commit to MFizz/PokemonGo-Bot that referenced this issue Jul 29, 2016
* Fixed sleep to use floats again

* Fixed sleep to use floats again PokemonGoF#2

* Refactored jitter to have its own function to be used elsewhere

* Fixes SpiralNavigation skipping waypoints

* Fixing stationary movements

* Improved StepWalker
(distances lower than speed should be walked directly)

* Fixes error on missing IV values
mhdasding added a commit to mhdasding/PokemonGo-Bot that referenced this issue Aug 1, 2016
solderzzc pushed a commit that referenced this issue Aug 3, 2016
* Feature: Use PokemonGo-Map sqlite db to catch pokemon near you

* added example config for move_to_map_pokemon

* adapted new config format

* Automatically update Map position

* remove pokemon when encountered early

* forgot to remove a log

* minor fix

* updated example config and added ignore config

* change ignore config to a list

* teleport to pokemon if walk option is 0

* added snipe option

* Teleport back after sniped pokemon was caught

* proper sniping

* mark sniped pokemon as caught

* forgot to remove print

* minor bug fix

* ignore max_distance when sniping

* prioritize VIPs in a 10km radius

* better prioritize vips

* syntax error fix

* set base priority for vips

* move map config example to seperate file

* use web api instead of sqlite db

* fix datetime format

* huge code cleanup

* forgot to snipe

* add vips to catch as default

* default priority for vips

* only mark pokemon as caught when it really was caught

* bugfix

* bugfix #2

* i should go to bed

* add option to disable map update

* updated example map config to match default example

* improve pylint result, fix catch recognition

* more code clean up

* better config example

* dump caught pokemon to json file to prevent targeting them on restart

* check if we got pokeballs to use

* remove print

* fix item_inventory_count returnin None instead of 0

* if we only have ultraballs and the target is not a vip don't snipe/walk

* remove gender symbols

* fix Mr. Mime

* vip wrong order fix

* bugfix

* log error when JSON decoding fails

* handle base64 error
MFizz pushed a commit to MFizz/PokemonGo-Bot that referenced this issue Aug 3, 2016
* Feature: Use PokemonGo-Map sqlite db to catch pokemon near you

* added example config for move_to_map_pokemon

* adapted new config format

* Automatically update Map position

* remove pokemon when encountered early

* forgot to remove a log

* minor fix

* updated example config and added ignore config

* change ignore config to a list

* teleport to pokemon if walk option is 0

* added snipe option

* Teleport back after sniped pokemon was caught

* proper sniping

* mark sniped pokemon as caught

* forgot to remove print

* minor bug fix

* ignore max_distance when sniping

* prioritize VIPs in a 10km radius

* better prioritize vips

* syntax error fix

* set base priority for vips

* move map config example to seperate file

* use web api instead of sqlite db

* fix datetime format

* huge code cleanup

* forgot to snipe

* add vips to catch as default

* default priority for vips

* only mark pokemon as caught when it really was caught

* bugfix

* bugfix PokemonGoF#2

* i should go to bed

* add option to disable map update

* updated example map config to match default example

* improve pylint result, fix catch recognition

* more code clean up

* better config example

* dump caught pokemon to json file to prevent targeting them on restart

* check if we got pokeballs to use

* remove print

* fix item_inventory_count returnin None instead of 0

* if we only have ultraballs and the target is not a vip don't snipe/walk

* remove gender symbols

* fix Mr. Mime

* vip wrong order fix

* bugfix

* log error when JSON decoding fails

* handle base64 error
solderzzc added a commit that referenced this issue Aug 6, 2016
* [BUGFIX] Catch Pokemon while walking to fort (#979)

Resolves: #821

* Added IGNORED_FILES list to pylint-recursive.py (#923)

* Fixed a bug where the bot crashed if 'catch' or 'release' wasn't specified in config.json

* Added install.sh and run.sh

* Added IGNORED_FILES list to pylint-recursive.py

* Removed --item_filter argument from pokecli

Removed due to 'complexity' of new item_filter, therefore it should only
be in config.json

* Fix the teleporting on web ui (#1074)

* Update README.md (#1063)

The plural of pokemon is pokemon.

* Broken connection fix (#1071)

* Broken connection fix

* Typos fix

* Forgot to load itemfilter after deleting args input

* Update README with Docker instructions (#759)

* Add metrics logging and output on close (#1059)

* Add metrics logging and output on close

Output looks like the following:

[17:10:07] Exiting PokemonGo Bot
[17:10:07]
[17:10:07] Ran for 0:00:20
[17:10:07] Total XP Earned: 210 Averaging: 36534.47/h
[17:10:07] Travelled 0.01km
[17:10:07] Visited 0 stops
[17:10:07] Encountered 1 pokemon, 1 caught, 0 released, 0 evolved, 0
never seen before
[17:10:07] Threw 1 pokeball
[17:10:07] Earned 100 Stardust
[17:10:07]
[17:10:07] Highest CP Pokemon: Nidoran M [CP: 75] [IV: 1/10/5]
Potential: 0.36
[17:10:07] Most Perfect Pokemon: Nidoran M [CP: 75] [IV: 1/10/5]
Potential: 0.36

* Added Metrics class to collect end of run stats

Tried to come up with a reasonable division of labour for how to gather
the information.

Open to feedback!

* Revert logging changes

Didn’t mean to affect this message any more.

* Merge cells together to avoid staying in one cell too long (#1061)

* Merge cells together to avoid staying in one cell too long

This should help mitigate the issue where the bot travels to a stop
that is farther than a nearby one because the nearer one is in another
cell.

I also release control back to the make loop after catching any pokemon.

* PR Feedback fixes

+ Add concatenation of nearby cells rather than override.
~ Actually call the SeenFortWorker rather than just reference it.

* Don't make work a property

I seem to have made it one at some point, somehow… Go PyCharm!

* Add check to ensure there are available gyms

* Refactor EvolveAll and InitialTransfer workers (#941)

* Refactor EvolveAll and InitialTransfer workers

* Fixing Item import

* Fixed 'Pokemon will now be caught from lures' (#1072)

* Set evolve speed in config (#1090)

* added evolve_speed

* updated README.md to include evolve_speed

* when filter set to 0, it will failed (#1101)

* fixing item_list not found (#1120)

* Fix Location caching doesn't work (#1031) (#1100)

* Update _get_catch_config in pokemon_catch_worker (#1124)

It should return the setting given by "any" in the catch_config file, instead of return {} for a "unspecified" pokemon.

* unhappy api parameter name (#1137)

* Making the metrics be printed correctly at the end of the run (#1136)

* REVERT #1072

* FIX REVERTED #1072

* Moving logic for catching the visible pokemon out into a new worker (#1142)

* Dump cells to enable custom front-end functionalities (#1145)

* Dump cells to enable custom front-end functionalities

Fixed merge issues for #1019

It now dumps the cell list as a json into data/cells-$username.json, so
that more front-ends can use this information (I'm working on a
Kivy-based one).

* Updated ignore file skip new cellfiles

* Adding a WorkerResult and the MoveToFortWorker only takes a single step towards a fort (#1146)

* RecycleItemWorker implemented (runs on every tick) (#1156)

* RecycleItemWorker implemented (runs on every tick)

* moved RecycleItemWorker to a better place

* recycle item worker logging improved

* simplify if in item_inventory_count

* removing extra space

* Moving these flags into the workers. Make them run on each tick (#1159)

* Removing duplicated release logic from catching pokemon (#1160)

* Updated readme, contributors and gitignore file (#1161)

* moved most of readme stuff to wiki in order for a clean readme table
* added myself to contributors at last
* removed old files from gitignore file

* More items info at start (#1167)

* Update __init__.py

* Update pokemon_catch_worker.py

* Update CONTRIBUTORS.md

* removing modules that cant be imported (#1165)

* removing modules that cant be imported

* Updated pylint check

It wont exit incorrect if no error exists

* Fixing logspam for transferring pokemon (#1164)

* Removing unnecessary walking from the move to fort worker (#1166)

* Removed logging (#1171)

Should not logg when logging is done once it finds something to release

* Removing logging wrapping cleaning up the pokemon bag (#1172)

* Revert "Removing duplicated release logic from catching pokemon" (#1188)

* Hotfix/walk to pokestop and refactor to walker (#1193)

* some nice refactoring to StepWalker to avoid repetition

* removing sleep in navigator (bot should only sleep after walk and in workers)

* fixing walk to pokestop

* removing personal debug log from step walker

* removing empty line

* added random_lat_long_delta again to StepWalker (my bad)

* completely removed walking progress bar (log trimming is required)

* better log color when exchanging pokemon (red)

* less sleep after spinning pokestop

* spiral navigator shouldn't reuse step walker instance

* Reduce number of inventory calls (#1231)

There’s way too many API calls for the inventory, so I added a coached
response that’s used until someone invalidates it (like when
catching/throwing and spinning stops)

* Add missing inventory fetch (#1233)

To recycle an item with the correct number, we should force fetch from
the server.

* API update fixes (i2f etc) and lured pokemon catching  (#1163)

* API update fixes (i2f etc) and lured pokemon catching

* API update fixes (i2f etc) and lured pokemon catching

* API update fixes (i2f etc) and lured pokemon catching

* API update fixes (i2f etc) and lured pokemon catching

* API update fixes (i2f etc) and lured pokemon catching

* API update fixes (i2f etc) and lured pokemon catching

* API update fixes (i2f etc) and lured pokemon catching

* API update fixes (i2f etc) and lured pokemon catching

* API update fixes (i2f etc) and lured pokemon catching

* Fix PogoAPI to a recent commit

* Fix PogoAPI to a recent commit

* Fix PogoAPI to a recent commit

* Fix PogoAPI to a recent commit

* Fix PogoAPI to a recent commit

* Added missing method

* Various bugfixes

* Various bugfixes

* Various bugfixes

* Various bugfixes

* Merging with recent commits

* Restored RecycleItemsWorker call

* Merged with latest commit

* Fixed arguments in method call

* Only work on forts when there is space in the bag. Do not switch mode (#1237)

* config parsing clean-ups (#1240)

* Update the location & location_cache logic (#1217)

Previously, the location_cache can't be used, even people set location_cache to TRUE. Everytime, it starts from the initial position.

Now the bot check the initial position first. 
Then check if people set location_cache. If so, read it and update it, otherwise use the initial location.
If there is no initial location and no location cache, print msg and exit.

* optimize docker usage (#1257)

* update Dockerfile; install missed python-protobuf package; add CMD as a way of defining default arguments for the ENTRYPOINT

* remove CMD command, default config parameter is also set in pokecli.py

* Only catch things that inherit from Exception. Try to prevent KeyboardError from being swallowed. (#1270)

* seperate worker for transfering pokemons to professor (#1281)

pulled out initial transfer and transfer on catched pokemon to seperate
worker

* Revert "Transfer poke worker" (#1284)

* Added GA in the README.me on dev branch first.

* Revert "Added GA in the README.me on dev branch first."

This reverts commit 90a17c0.

* adding random delay between pokemon capture & transfer. #774 (#1225)

* adding random delay between pokemon capture & transfer. #774

* improved fix for #774 by adding click_action_delay function

* wait time minimum & maximum are passed in from the config now

* updated readme & contributors files

* updated how action wait times are loaded from config

* optimize docker usage (#1257)

* update Dockerfile; install missed python-protobuf package; add CMD as a way of defining default arguments for the ENTRYPOINT

* remove CMD command, default config parameter is also set in pokecli.py

* Removed erroneous line in human_behavior and corrected bad merge resolution

* updated configs & changed function name to action_delay

* Fixed seperate transfer bug in worker (#1286)

* seperate worker for transfering pokemons to professor

pulled out initial transfer and transfer on catched pokemon to seperate
worker

* Fixed bug where config parameters wasnt checked

* Initial_transfer renamed to release_pokemons

Also updated the configuration argument

function to release pokemon runs on tick method which is called after
everyt small step the bot takes

* added back exception which was missing

* Default conf value and fixed typo

* fixed typo for pokemon and updated config
* added default value if its missing from conf

NOTE: transfer conditions are set by "release" parameters in config,
however we keep the highest CP of each pokemon, just to be sure we don't
empty the bag.

* Capital leter

* missed to rename on some places

Also enabled loggning to easier see why a certain pokemon may not be
transfered to professor for candy

* Log format update

* moved runtime error to evolved_capture statement

workaround if anyone should get it...

fixing it in future

* Anonymous login succ/failed/relogin/logout info to GA. (#1312)

* There's a big warning before bot login and 2s wait for exit if the health report is turned on.
Anonymous login succ/failed/relogin/logout info without any user account info will be sent to GA.
The function is not called to wait Signal system merge.

* Fixed page view is not true.

* Removed [x] since we ditched it.

* Refactoring get_nearest_fort code

* Update README.md

* Replacing config.mode with capture_pokemon and spin_forts

* Removed the GA.

* Revert "Removed the GA."

This reverts commit 58d7a67.

* Allow to keep stronger pokemon (#1302)

* Allow to keep stronger pokemon. It is woring both with CP and IV

* Remove not needed code

* Add example of keep_best_iv into configuration

* Add delay before pokemon transfering

* Resolve merge conflicts

* Use config.release_pokemon to determine should we release pokemon or not

* Fix a bug

* Update config.json.example (#1340)

Update config.json.example 4c46ad7

* Adding the new flags to the config.json example files (#1344)

* Add Mr. Mime to config.json.pokemons.example (#1350)

Add Mr. Mime to configs/config.json.pokemons.example

* Refactoring code into a SpinNearestFortWorker (#1351)

* Removing CatchVisiblePokemonWorker's argument of cell (#1352)

* Iterate over each worker and treat them the same (#1356)

* Fix merge conflicts that caused bugs (#1361)

* Merging some unnecessary methods and renaming take_step on the bot to… (#1360)

* Merging some unnecessary methods and renaming take_step on the bot to tick

* Merging variable definition

* Use a more human friendly time format (#1364)

* fixed transfer worker api crash (#1369)

* fixed transfer worker api crash

try catch exception to prevent bot from crashing

* better cach error method

* prevent call __getitem__ on bool error (#1355)

* prevent call __getitem__ on bool error

* fix for pr

* update sample config to solve bug (#1392)

buggy:
"catch_above_cp": 0, "catch_above_iv": 0.8, "logic": "and"
replaced:
"always_catch": true

* Added worker for incubating eggs (#1404)

* Added worker for incubating eggs

* Added options to configuration

* Bugfix

* Ignoring used eggs and incubators

* Using cached inventory instead of getting a fresh copy

* Implement proper version of keep_best option (#1395)

* Implement proper version of keep_best option

* Fix order of pokemons

* Change formatting

* Display kept pokemons, to be sure that it is working ok

* Don't print same info again and again

* Remove other worker using

* Get back spacing format

* Catch transfer worker error (#1423)

* fixed transfer worker api crash

try catch exception to prevent bot from crashing

* better cach error method

* Fix for clash between CLI and JSON args (#1420)

* makes spin forts and catch pokemon config in json not being overwritten by default cli args value if user dont provide cli args

* huge fix to how cli and json parameters are loaded

The CLI parameter parser now uses JSON-loaded parameters as first
fallback to missing parameters. The second fallback to missing
parameters are the default values previously used.

This is the perfect handling for making CLI args override JSON
configuration only for provided args. Non-provided args that are not
found in are set to the default value we think most users are going to
like.

* overriding config from loaded JSON is not necessary here anymore

* trying to fix the auth_service parameters

* add mixing cli args fixes that were forgotten

* fixing unicode load in location

* refactoring parameter configuration to avoid mistakes

* changed the order of functions in pokecli.py to follow some guidelines

main function comes first all all its children below

* small fix to evolve_cp_min

* text when pokemon is released improved

* Adding a message in the Readme about not supporting gym battles (#1453)

* Pokemon plural (#1477)

* Fix pokemon plural

* Delte old pokemon file

* [FEATURE] Api Wrapper to handle connection issues (#1459)

* add an api wrapper managing (trying to) handle connections error, needs more testing

* refine error testing

* import fix

* sleep less, lazy bum

* change retry parameter as an optional argument

* Magikarp twice in release block (#1486)

* Fix typo in filename (#1494)

* Add name to CONTRIBUTORS

* Add name to CONTRIBUTORS

* Fix typo in catch_visible_pokemon_worker filename

* Add missing renamed catch_visible_pokemon_worker to repository

* [Bug fixes] Further checking for the api wrapper response (#1499)

* further checking for the api response

* make sure to pop the request_callers field first

* comment

* new PolylineWalker(StepWalker) - [was #990] (#1467)

* new PolylineWalker(StepWalker)

Refactoring in the context of the new walker/navigator concept

Fixes:
-  PolylineWalker class renamed to Polyline
-  new class PolylineWalker(StepWalker)
-  change few tests

* fixed imports

* Added further release functionality (#1472)

* Added functionality to keep Pokemons based on IV and CP at the same time.

* Fixed example config and _validate_keep_best_config

* Added secondary criteria IV when CP is equal and the contrasting case.

* Removed unused import

* Use type unicode for argument location (#1503)

* Use type unicode for argument location

Fix for issue with invalid <lambda> value for location argument, e.g.: invalid <lambda> value: u'Pra\xe7a' when it contains special characters like "ç".

* Parse location for both command line and json

Will now correctly parse location both from command line and JSON file.

* Better naming for function to parse unicode str

* Added circle avoidance (#1515)

* Added circle avoidance

* Changed to add_config

* Changed path to recent_forts.
Put config keys into spin_forts key

* cp_min -> evolve_cp_min in config.json.example

* Update README.md

* annoying bug (#1559)

Added if try_cnt > 1: to remove the annoying count in logs due to server latency
or something
The response that comes back is "52" from api.

* Throttling api requests. Reverting log change (#1562)

* Egg incubation improvements (#1526)

* Moved egg hatching to incubation worker, added feedback for users

* old response handling and updated readme

* Fix evolve_all and use_lucky_egg (#1541)

Fixed issues where evolve_all would not run.  Also fixed use_lucky_egg
so that it only runs on the first tick.  Refactored so the
EvolveAllWorker._should_run function requires less logic (optimization)

* Event system for logs and web socket communication (#1523)

* Event system implementation

* some web socket work

* refactored the event system for clean ups

* added socketio_client to requirements

* let's not run event system setup yet and remove some tests

* add possibility to set the event level in event system

* some event system examples as comments

* fixed handler and rudimentary version of real logging handler

* better logging

* fixing type in example about emitting events

* added host and port configuration for websocket server instead of hardcoding them

* added flask to requirements.txt

* Revert "Egg incubation improvements" (#1565)

* Reduce log spam when moving towards forts (#1566)

* Fixed import error in api_wrapper (#1561)

* Moved egg hatching to incubation worker, added feedback for users (#1568)

* Refactoring function to get forts (#1578)

* Refactoring function to get forts

* Optionally sort by distance

* Update pokemon_transfer_worker.py (#1571)

* Update pokemon_transfer_worker.py

Grammer correction.

* Update pokemon_transfer_worker.py

* adding support for embedded config keys and fixing circle prevention

* CatchVisiblePokemonWorker now catches pokemon from lures (#1591)

* CatchVisiblePokemonWorker catches from lures

* Fix typos

* Allow worker order to be more easily customised in future with PokemonGoBot (#1600)

* Make SeenFortWorker top level (#1601)

* CatchVisiblePokemonWorker catches from lures

* Pull out SpinNearestFort into its own top level worker. Remove pokemon catching behavior

* Removing unused reference

* Moving MoveToFort to the top level (#1605)

* Moving MoveToFort to the top level

* Fixing bad import

* Consolidate similar meaning configuration keys properly inside another key (#1590)

* adding support for embedded config keys and fixing circle prevention

* forgot to fix this config

* refactor nested config system to support flag likes `--forts.something.anything`

This example `--forts.something.anything` would be parsed as
`config.forts_something_anything`. And in the JSON config it should be
like this:

```
‘forts’: {
    ‘something’: {
        ‘anything’: 1
    }
}
```

* add fix_nested_config(config) call

* update missing usage of `config.avoid_circles` -> `config.forts_avoid_circles`

* removed pdb, sorry

* fixing buggy merge, i'm sorry

* one last fix to nested config for fort spinning

* other small fix to nested config

* Fixed args PolylineWalker to match the super StepWalker class (#1621)

* * Removed pokemongo_bot/polyline_stepper.py - old Stepper() class
* Fixed args PolylineWalker to match the super StepWalker class
* Added a check to Polynine() point tinitalization, if no route was
  found then, we will return no points between orig, dest thus will
  walk in straight line - expected behaviour will teleport in small
  steps

* * fix typo

* "evolve_captured" is now using a list instead of a boolean (#1532)

* "evolve_captured" is now using a list instead of a boolean, working the same way as "evolve_all"

* parse error with format details when "evolve_captured" is not a string, or is the string "true" or "false"

* Extract CatchLuredPokemonWorker from PokemonCatchWorker and improved worker order (#1627)

* extracted lure catch worker from pokemon catch

* removing information less logs

* little refactoring to catch lured pokemon worker

* Fix 'with' statement mistakes (#1641)

* Update catch_visible_pokemon_worker.py

* Update __init__.py

* using get_cell_ids from pgoapi package

* trying to fix annoying log

* ok, I give up on log organisation

* Randomize `normalized_reticle_size` and `spin_modifier` parameter for `catch_pokemon` api (#1205)

* the MoveToFortWorker should always go to the nearest fort (#1666)

* Fix transfer worker not triggered for last pokemon (#1664)

* Making the SpiralNavigator a worker (#1683)

* Making the SpiralNavigator a worker

* Passing pylint

* Passing linter

* fixes Polyline class to handle a case in which google is returning only one point (#1674)

* Fixes:

https://github.com/th3w4y/PokemonGo-Bot/issues/27

* Fixes:
PolylineStepWalker walks for only one seconds #28
https://github.com/th3w4y/PokemonGo-Bot/issues/28

by adding a while destination nat reached loop

* fixes typo

* Revert "Making the SpiralNavigator a worker" (#1698)

* feat: show xp after catching pokemons (#1700)

* Update config.json.pokemon.example (#1711)

config.json.pokemon.example was missing several fields present in config.json.example

* Huge clean-up: PEP8, sort imports, remove deprecated and unused imports (#1697)

* SoftBan Worker (#1724)

* created a softban worker

* only delete key from dict if it is there

* pep8 stuff

* Improve docker usage; use docker-compose for starting the PokemonGo-Bot ecosystem (#1669)

* update Dockerfile; install missed python-protobuf package; add CMD as a way of defining default arguments for the ENTRYPOINT

* remove CMD command, default config parameter is also set in pokecli.py

* improve docker usage; add single container run for the webUI; add docker-compose.yml for starting the bot ecosystem with one command

* fix "How to run with Docker" link

* fix timezone setting: send timezone arg to the docker image build process, e.g. "docker build --build-arg timezone=Europe/Berlin -t pokemongo-bot ."

* adding a duplicate of SeenFortWorker before MoveToFortWorker

this ensures we interact with forts while we are moving to other forts

* Show Pokestop names (#1671)

* Restore the ability for a user to see Pokestop names. Default to off.

* Use the add_config function for forts.show_name (now default to true)

* Move fort_details function into cell_workers init module

* Forgot to pass bot reference

* Catching lured pokemon should use same fort_details API

* REmove config option. Always show Pokestop name.

* Move away from KeyError handling as per TheSaviour's suggestion

* fixing wrong import

* No longer caching things on the worker. Pulling straight from the bot instance (#1747)

* Creating an instance of the workers only on startup (#1750)

* Don't try to release pokemons in forts (#1751)

* * Always report session summary even on crash (#1759)

* Prevent crash checking session (#1754)

* Prevent crash when check session

* Fix function call

* [FIX] use_lucky_egg (#1774)

Changes to the tick_count caused the use_lucky_egg to not run.  Since
the tick_count is incremented prior to running the workers, the
tick_count will be 1 on the first tick

* add a flag to enable user to choose if he wants to walk to spin forts (#1772)

* add a flag to enable user to choose if he wants to walk to spin forts that are far away

* updated config example

* Display Fort Name instead of Fort ID in Log (#1801)

Displays the fort name in the CLI instead of the fort id.

Easier to read, better to look at than a hash.

* Update incubate_eggs_worker.py (#1862)

Fix: variable 'pokemon_data' referenced before assignment

* Improved some code formatting & fixed unicode issue with the logger. (#1839)

* Improved some code formatting & fixed unicode issue with the logger.

* Corrected formatting of log method & improved formatting of spiral_navigator.py

* Upgrade the capture logic for VIP pokemons! (#1807)

* This fix a small bug when user didn't update their config file for VIP setting (#1874)

* [FEATURE] Path Navigator (#1457)

Adds a navigator that walks along specified points.

* fixing a typo that causes a NameError exception (#1898)

* Adding a TreeConfigBuilder and tests (#1901)

* Adding a TreeConfigBuilder and tests

* Adding mock to the requirements

* not actually using mock or patch

* Egg Incubation - IV fix and UnboundLocalError fix (#1777)

* fixes for ivs and bad var

* Custom response/early return for error

* added check for blank ids

* added temp lists for duplication mitigation

* Removing Worker suffix on workers (#1914)

* Renaming more workers to make grammatical sense (#1915)

* Improved Path Navigator, Now Supports geopositioning resolution (#1917)

* Refactored Path Navigator, now supports geopositioning resolution

* Update path example config, for new format

* Fixed typo in dict

* Fixed Ref

* Possibility to set another config with run script (#1899)

* Location cache check. If start position differs, don't use the cache. (#1932)

* Making the navigators workers (#1933)

* Adding the navigator to the list of workers (#1950)

* Updated item_filter in config.json.example to use item names instead item id's (#1733)

* Updated item_filter in config.json.example to use item names instead of item id's

* Config.json item_list verification

* Merge remote-tracking branch 'upstream/dev' into dev

Conflicts:
	pokemongo_bot/cell_workers/recycle_items.py

* Adding recycle_items back
Changed error return type

* Configure the tasks from config.json (#1956)

* Configure the tasks from config.json

* Linking error to wiki

* Removing config for catch_pokemon (#1963)

* Loop over an array of old flags (#1964)

* Removing config forts_spin

* Removing hatch_eggs from config

* One more for hatch_eggs

* Removing config for release_pokemon

* One more for release_pokemon

* Removing config for softban_fix

* Removing config for forts.spin

* Removing config for forts.move_to_spin

* Supporting task level configuration (#1979)

* Supporting task level configuration

* Updating sample config files

* Providing example of how to configure tasks in the example configs

* Adding a task base class (#1983)

* Re-enable item ID's in the item_filter. (#1986)

* Allows users to enter both item ID's and item names in the item_filter.

* no message

* Allow to collect level up rewards (#2004)

* Foundation for remote control of the bot over websocket (#2000)

* improved websocket and logging handler

* added support for remote command execution through websocket and a player_info call example

* adding a missing variable

* only execute remote command if it exists and is callable, else return command not found

* wait forever instead of 5 secs in an infinite loop

* Tasks now extend a base task (#2007)

* Moving evolve_speed to task configuration

* Moving use_lucky_egg to be a task configuration

* Fixing bug in evolve all. Fixes #2019

* Removing unused navigator switch

* Avoid transferring favorite pokemons (#2038)

* Move follow path task config (#2044)

* Refactor (#1587)

* fixing `.get` call (closes #2082)

* Log location as a str (#1825)

We already have location as an encoded str in location_str and most calls to log pass a string as argument, so this is a bit more consistent.

* Update README.md

* Giving errors when specifying navigator cli arguments (#2126)

* [DEV FEATURE] Test framework .... beginning (#1682)

* add mock and nose to the dependencies

* added unit tests for the api_wrapper

* add testing to travis build

* fixing path ?

* pylint error fixed

* adding myself to contributors

* add test for the step_walker

* add runtime error for big distances

* change travis, nosetests should look for tests in all the folders

* Getting rid of nose, rename some files, add 'timeout_decorator' to the requirements

* update travis.yml

* changed run_tests script from bash file to python file

* revert file changes

* skipping failing test

* fix another test

* some style/import improvment

* revert SKIP_TIMEOUT

* remove run_tests.py

* move tests cases into main test folder

* refactor some code api_wrapper_test

* refactor and location parser

* test is failing add a FIXME tag

* location is now unicode friendly

* Fix throw type always normal when trying to catch pokemon (#2130)

* Warns if there aren't sufficient space left for loot. (#2137)

* Warns if there aren't sufficient space left for loot.

SpinFort will terminate silently, and users will not notice
that SpinFort is skipping due to the lack of space.

As a result, it sends out requests to Niantic even faster than before
becuase tasks are looping faster and doing noops. More server busy (error 52)
errors appear in the log without an explanation of what's actually
going on.

* improve readability of should_run for SpinFort and MoveToFort

* [Feature] Detect maximum cluster and move (#1993)

* adapted to new commits

* added config
changed gitignore

* added config

* locked versions

* typo

* account for task management change

* moved find_cluster to utils. follow_cluster now 1 task

* added test for follow_cluster

* added mock requirements

* trying to get travis to build

* trying to get travis to build

* added search for lured cluster functionality

* adapted tests

* removed double specification

* only use berries on VIP pokemon if catch rate is less than 90% #2135 (#2138)

* [FIX-Config] 'use_lucky_egg' should not be true in the exmple config file (#2105)

* Update README.md

* Added check for valid keep_best_iv amount (#2150)

* Cluster Selection so it doesn't jump from cluster to cluster (#2153)

* added secondary criteria so it doesn't jump from cluster to cluster when they're equally large

* added secondary criteria so it doesn't jump from cluster to cluster when they're equally large

* updated cluster example

* Adding an Anyball item to the release config (#2140)

Adding an Anyball item to the release config

* removed wrong log (#2160)

* Revert "Adding an Anyball item to the release config" (#2166)

* This should fix issue: (#2185)

MoveToFort(self.bot).work()
TypeError: __init__() takes exactly 3 arguments (2 given)

* Better enforce rules about Pokemons to retain. (#2073)

Rules about maximum CP and IV to transfer Pokemons are applied
also when keeping the best ones.

* Fix incorrect config value for HandleSoftban. (#2191)

* Moving item_filter to be a task level configuration

* Moving evolve_all to be a task level configuration

* Moving evolve_cp_min to be a task level configuration

* Added nickname worker (#1850)

* Adding a SleepSchedule worker.  Pause for some time every day (#2193)

* Added Sleeper worker

* changed Sleep worker name to SleepSchedule

* fixed wrong import names

* changed name in log

* Removing nickname pokemon from the example config

* Remove MoveToFort from the FollowPath example config (#2203)

FollowPath will not work properly while also using MoveToFort.

* Using the logger instead of print in EvolveAll

* fixed pokemon transfer so that "keep_best_*" filters can work again without requiring to be combined with "release_below_*" rules (#2215)

* Let the user know that the maps api key exceeded its limits. (#1989)

* Change FortID to FortName (#2249)

Making it more human readable. I did not test this change, just used the same field from movetofort line 41 and spin fort line 33.

* Request meta cell data once every 5 seconds (#2171)

This solve the Niantic "scan for pokemon" throttling without
making the bot very slow.

* Use Default map_object_cache_time if not specified

* Change egg hatching text (#2258)

* [FIX] Improper use of exception  (#2246)

* adapted improper exception use

* beautified

* fixed logic error

* Add optional simple lure attraction feature (#2257)

* Add lure attraction params in default config

* Update CONTRIBUTORS.md

* Add simple lure attraction feature (move2fort)

* Update move_to_fort.py

* Dev - Fixed the loss of fort data (updated) (#2269)

* Keep fort data even if the server returns no fort data. Also replaced redundant code.

* Making sure we only save fort data if the server returned multiple forts.

* Update web to latest master commit (#2274)

The current dev commit has an issue where it doesn’t show the number of
candies.

* Add missing curly bracket (#2282)

Added missing curly bracket to tasks>MoveToFort>config

* added param in config.json.pokemon.example.

* web submodule updated to latest commit (#2289)

* Modify SpiralTask to use 70m as stepsize and diameter as step_count (#2194)

* Lowered the stepsize in Spiral navigator to more accurate 70m

* Moved max_steps to task configuration and changed it to diameter

* Added diameter to configuration example

* Bugfix

* Removed max_steps from cli

* Added max_steps as legacy configuration

* Made step size of follow_spiral more configureable

* Changed default value for diameter

* This is just a temp fix, The one added the configure param need make sure it's really work.

* Fix instance where evolve_all is unicode - fixes #2281 (#2305)

* Fix instance where evolve_all is unicode

* Test for isinstance basestring rather than Unicode || str

* [Feature] added keep pokemon for batch evolution (#2255)

* added keep_for_evo

* accounted for non evolable pokemon

* additional logging

* additional logging

* moved get_candies to utils

* disregard 2nd stage evolution pokemon

* added sample configs

* Supporting sending requests through an HTTP proxy (#2358)

* Added proxy support

Added proxy support from config.json and command line. with parameters:

-prxip | --proxy_ip  or proxy_ip from config.json for ipv4 format as string "aaa.bbb.ccc.ddd"

-prxp| --proxy_port or proxy_por from config.json as int from 1 to 65536.

* Added proxy support

Added two additional parameters (proxy_ip and proxy_port) to add support for proxy.

proxy_ip must be as string of ipv4 format: "aaa.bbb.ccc.ddd" , proxy_port must be a int from 1 to 65536, if proxy_ip is null or set to "" and proxy port is null or set to 0 proxy will be ignored and not used.

* Moved proxy function to a method.

Moved proxy function to a method.

* Changed the name of method

Changed from set_proxy_if_exists to setup_proxy

* Revert "Dev Proxy support" (#2374)

* Revert "[Feature] added keep pokemon for batch evolution" (#2380)

* Adapt code to new PGoApi Code (#2357)

* wip: fixing imports and tests

* tests are passing

* add tests, and modify calls to api accordingly

* fix login bug

* fix rebase

* fix import error

* Handle ThrottlingException

* fix relogging errors

* Refactor evolve_all worker (#2244)

* Refactor evolve_all worker

- Remove transfer of evolved pokemon (should be handle by transfer task)
- Add order_by config flag to choose to evolve by iv or cp (default: cp)
- Add evolve_iv_min as threshold for evolve by iv (order by cp under threshold)
- Fix _validate_config not called before
- Get candy list to test if enough candy in the bag
- Filter out pokemon which can't be evolved

* remove unnecessary debug lines

* Add missing candy name

* Use uncached inventory to have up to date amount of candy and list of pokemon

* Fix candy name
Add missing candies

* Fix evolving logic:

- replace "order_by" by "first_evolve_by" to choose if we prioritize "cp" or "iv" (default: "cp")
- replace "evolve_cp_min" by "evolve_above_cp" (default: 500)
- replace "evolve_iv_min" by "evolve_above_iv" (default: 0.8)
- add "logic" to choose if we "evolve_above_cp" and/or "evolve_above_iv"
- update config file

* Rename EvolveAll to EvolvePokemon task name

* Add error warning about task renaming

* Add a test about tasl renaming

* Fix task renaming warning

* Update new api wrapper

* delaying errors, and reducing noise (#2393)

* Removed max_steps in the config pokemon sample. Also added FollowSpiral's new options (#2342)

* Display stats in the terminal title (#2252)

* Added UpdateTitleStats worker

* Added UpdateTitleStats worker

* Fixed return inconsistency in work method

* 🚀 Massively improved pylint rate

Cleaned ctypes unnecessary imports
Moved initialization inside __init__ method

* Fixed incorrect default value for min_interval

* Added support for cygwin on Windows

* Catch UnexpectedResponseException and retry (#2407)

* Catch UnexpectedResponseException and retry

* New func for UnexpectedResponse

* Fixed merge conflicts.

* Randomize spins for softban #2247 (#2253)

* Randomize spins for softban #2247

* Update handle_soft_ban.py

* fix(docker): correct web config file path (#2350)

* Allow for 3-7 decimal points for coordinates (#2402)

Some exports only provide three decimal point accuracy, and sometimes 4.440000 turns into 4.44, need to adjust the regex.

* PokemonGo-Map Synergy (#1992)

* Feature: Use PokemonGo-Map sqlite db to catch pokemon near you

* added example config for move_to_map_pokemon

* adapted new config format

* Automatically update Map position

* remove pokemon when encountered early

* forgot to remove a log

* minor fix

* updated example config and added ignore config

* change ignore config to a list

* teleport to pokemon if walk option is 0

* added snipe option

* Teleport back after sniped pokemon was caught

* proper sniping

* mark sniped pokemon as caught

* forgot to remove print

* minor bug fix

* ignore max_distance when sniping

* prioritize VIPs in a 10km radius

* better prioritize vips

* syntax error fix

* set base priority for vips

* move map config example to seperate file

* use web api instead of sqlite db

* fix datetime format

* huge code cleanup

* forgot to snipe

* add vips to catch as default

* default priority for vips

* only mark pokemon as caught when it really was caught

* bugfix

* bugfix #2

* i should go to bed

* add option to disable map update

* updated example map config to match default example

* improve pylint result, fix catch recognition

* more code clean up

* better config example

* dump caught pokemon to json file to prevent targeting them on restart

* check if we got pokeballs to use

* remove print

* fix item_inventory_count returnin None instead of 0

* if we only have ultraballs and the target is not a vip don't snipe/walk

* remove gender symbols

* fix Mr. Mime

* vip wrong order fix

* bugfix

* log error when JSON decoding fails

* handle base64 error

* Return type None on nested call was breaking details display (#2416)

* Adding a section on analytics and metrics to the Readme (#2434)

* Fix to display stats on iterm2 terminal (#2440)

* Fix #2442 - should_retry_throttle isn't defined (#2461)

* Fix #2442

Variables weren't correctly defined

* Fix typo

* Replace all `logger.log` calls with events! (#2173)

* bye bye `logger.log`, hello event system!

* fixing travis build

* trying to fix travis build

* test fixes

* updating remaining `logger.log` calls that should be replaced

* typo

* typos in IncubateEggs event

* improved fort loot event data

* fixing update_location event's distance unit

* fixing some events and log stuff

* adding missing fort_name parameter to lured_pokemon_found event

* fixing a variable inside an event formatted string

* fixing typos and utf8

* trying to fix tests with regards to float precision

* adding command to print all registered events and their parameters

* fixing tests yet again

* trying to fix unicode issues, arrgh!!!

* added a move to lured fort event

* better distance text in move to fort and fixing utf8 in spin fort task

* removing print from websocket server

* start embedded server before creating the socketio_handler

* I hate unicode

* rename and sleep events

* refactoring in how we emit events to avoid code repetition

* PokemonCatch task inherits from BaseTask

* go away, dirty logger.log!

* pep8 and removed logging handler name attribute

* good bye for the remaining logger.log calls

* bye logger module

* no more logger imports!

* removed last few loggers

* removing secret file and fixed variable name in follow cluster

* fixing kwargs for event emit

* trying to fix unicode handling one more time

* now it works!

* fixing more logs and removing debug unicode string

* no logs on websocket server yet

* adding a script to start a standalone websocket server

* more adjusted in websocket to support multiuser

* adding a fallback to logger.log issues a very verbose deprecation warning

* putting back compatibility with json based web ui

* correct parsing evolve_all (#2455)

* correct parsing evolve_all

Previously, 

```
 "evolve_all": "Pidgey, Caterpie, Weedle",
```

would only evolve Pidgey. This PR fix that.

* fix parsing evolve_captured

* Remove max_steps from examples and set EvolveAll to EvolvePokemon (#2430)

* Adding Raven to send exception reports to Sentry (#2514)

* Adding Raven to send exception reports to Sentry

* Removing test exception

* Removing incompatible python3 analytics library

* Using logger.log

* Using the correct logger

* changing license from MIT to GPLv3

* Updated README.md to state bot status (#2586)

* Added bot broken message at top of page.

* Changed REAME.md to mirror #2590

* Reordered

* Handling KeyboardInterrupt and some other exceptions (#2599)
douglascamata pushed a commit that referenced this issue Aug 12, 2016
* Add Use Ultraball (#1)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add Use Ultraball if No Other Balls (#2)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Revert "Add Use Ultraball" (#4)

* Use Ultraball If No Other Balls (#3)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Remove 'use_ultraball' event.

* Remove `use_ultraball` event call

* Update & add avoid catching Pokemon if no pokeball

* Update conflict contributors

* Add get `min_ultraball_to_keep` from config file

* Improved `min_ultraball_to_keep` with condition

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Add `min_ultraball_to_keep` option

* Remove count all pokeballs

* Resolved Conflicts
douglascamata pushed a commit that referenced this issue Aug 12, 2016
* Add Use Ultraball (#1)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add Use Ultraball if No Other Balls (#2)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Revert "Add Use Ultraball" (#4)

* Use Ultraball If No Other Balls (#3)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Remove 'use_ultraball' event.

* Remove `use_ultraball` event call

* Update & add avoid catching Pokemon if no pokeball

* Update conflict contributors

* Add get `min_ultraball_to_keep` from config file

* Improved `min_ultraball_to_keep` with condition

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Add `min_ultraball_to_keep` option

* Remove count all pokeballs

* Resolved Conflicts

* Change from `items_stock` to `ball_count`
solderzzc added a commit that referenced this issue Aug 14, 2016
* Adding plugin support (#2679)

* Adding plugin support

* Adding an empty __init__.py

* Moving the base task to the project root (#2702)

* Moving the base task to the project root

* Moving the base class more

* Changing the import again

* Adding a heartbeat to the analytics (#2709)

* Adding a heartbeat to the analytics

* Heartbeat every 30 seconds, not every 5

* Don't double track clients

* Fix 'local variable 'bot' referenced before assignment'

* Providing an error if tasks don't work for the given api (#2732)

* Fix for utf8 encoding when catching lured pokemon (#2720)

* Fixing lure pokestop encoding

* fixing lure encoding

* Fix For catchable not being displayed on the web (#2719)

* Fix For catchable not being displayed on the web

* Update catch_visible_pokemon.py

* Added encrypt.so compilation process to Dockerfile (#2695)

* OS Detection for encrypt lib (#2768)

Fix 32bit check, darwin and linux use the same file

Make it a function

Check if file exists, if not show error

Define file_name first

Fix return

Check if file exists, if not show error

Print info about paths

Fix for 32/64bit detection

* Fix Typo in unexpected_response_retry (#2531)

fixes #2525 #2523

* Revert "changing license from MIT to GPLv3"

This reverts commit 69fb64f.

* When the google analytics domain is blocked the bot crashed. (#2764)

With a simple try / except this can be solved.

Fix dirty catch all

* Fixes #2698 - Prevents "Possibly searching too often" error after re-login. (#2771)

* Fixes #2698
- Added api.activate_signature call to prevent issue after re-login.
- Also replaced deprecated log call with event_manager emit to prevent exception being thrown.

* Modified to use OS detected library path as per PR #2768

* Support loading plugins from .zip files (#2766)

* Keep track of how many pokemon released (#2884)

* Setting Library path to work with encrypt.so (#2899)

Setting LD_LIBRARY_PATH on Dockerfile

* ✨ Added login and username to available stats (#2494)

Added a player_data property in PokemonGoBot to access player data from outside
Added unit tests for login and username stats
Added tests for call args when updating the window title
Added a platform-specific test for window title updating on win32 platform

* [dev] small fixes (#2912)

* Fixed emit_event typo

* Update CONTRIBUTORS.md

* Changed initialization location for "bot"

We use bot in main exception on 128

* Update pokecli.py

* Rename load_path to load_plugin (#2947)

* Adding some logic for pulling plugins from github (#2967)

* flush after title update (#2977)

* correctly re-raise exception to keep backtrace (#2944)

* Update MoveToMapPokemon to use events instead of logger. (#2913)

* Config/encrypt.so (#2964)

* Add config option for libencrypt.so

* Correctly set the config value and check for the file in said dir

* Fixed mispelling for "formatted" variable (#2984)

* Loading plugins from Github (#2992)

* Checking github plugin file existence

* Loading plugins from github

* Fixed #3000 (#3003)

Fixed syntax error on "move_to_map_pokemon.py" that makes the client crash when using this feature.

* Added MaxPotion inventory count to summary. (#3015)

Short Description: 
The Max Potion count was missing from the inventory summary.

Was #2456

* Added cleanup of download and files for encrypt.so after they are no longer needed (#3011)

* Fix bot not returning back after telepoting (#3014)

* Fix typo: last_long -> last_lon

* Whitespace cleanup

* Fix bug introduced by #3037: bot not returning back

* Fix Dockerfile installation (#3057)

* Fix for #3045 (#3055)

* Added request to check configuration (#3089)

* Fixed Dockerfile - missing \ on command lines (#3096)

* Fixed mispelling for "formatted" variable

* Docker commands missing trailing \

* Fix for FileIO slowing bot performance.This puts the map writing into a thread and makes sure it only executes  once. (#3100)

* Change word usage: "fled" to "escaped" (#3118)

"fled" is confusing to lot of people and is easily confused with pokemon vanishing. "escaped" is a better term.

* Update the example config file (#3120)

* Add config option for libencrypt.so

* Add config option for libencrypt.so

* Add config option for libencrypt.so

* Add config option for libencrypt.so

* Rename path.example.json to path.json.example

* typo: logrmation -> information (#2601)

Fix a typo. 

I assume that it was "information" initially, but became "logrmation" when someone used replace all functionality to replace all infos with logs. But I might be totally wrong at this point, idk. Just didn't like the word and wanted to fix that typo.

* Change fled to escaped (#3129)

Fix an issue after PR #3118

* When JSON parsing fails, give a rough indication of why (#3137)

* When JSON parsing fails, give a rough indication of why

* Use the official package instead of SHA1 commit

* Handle Github Download Zip Format (#3108)

* Checking github plugin file existence

* Loading plugins from github

* Starting install code for github plugins

* Updating GithubPlugin to support extracting folders

* Handling github zip formats by extracting to the correct location

* Refactor catch worker (#2527)

* refactor catch worker

* fix

* few renames

* add to contributors

* fix

* add missing behavior

* fix encounter events

* don't make events about ignored pokemon

* Added Run-Loop (#3143)

* Add files via upload

modified run script wich let you run the boot in a loop(if it crashes it restarts)

* Integreated Loop into run.sh

modified run.sh to loop the script so that even if it crashes it
automaticly restarts.

* fixing loop in spin fort task (#3165)

* Some love for the vim users (#3154)

* Updated README with link to desktop version (#3208)

* Fix for #3190 (#3197)

* MoveToMap: Add minimum balls to run (#3166)

* added config to ignore item count for Spin and MoveToFort (#3160)

* [Inventory Management] Add a central class for caching/parsing inventory & static data (#2528)

* new class to centralize inventory management

* use new inventory class in evolve_pokemon

* use new inventory to display # candy after catch

* Keeping a cache of gym information (#3236)

* New Option: "dont_nickname_favorite" (#2496)

* New Option: "dont_nickname_favorite"

This change (line 19) adds the option, that the user can choose, whether their favorite pokemons should also get a new nickname or not.

If a user want this, then he or she has to add the line ("dont_nickname_favorite" = true) after ("nickname_template": " ... ",).

* Update nickname_pokemon.py

* Update

* Put change to line 30

This reduce the reduce the runtime, because favorite pokemon won't be added to the list.

* Restart the loop when catching pokemon and there are more to catch (#3242)

* fixed NameError: global name 'pokemon_name' is not defined (#3244)

resolves ```traceback (most recent call last):
  File "pokecli.py", line 521, in <module>
    main()
  File "pokecli.py", line 95, in main
    bot.tick()
  File "/usr/src/app/pokemongo_bot/__init__.py", line 451, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/usr/src/app/pokemongo_bot/cell_workers/evolve_pokemon.py", line 38, in work
    self._execute_pokemon_evolve(pokemon, cache)
  File "/usr/src/app/pokemongo_bot/cell_workers/evolve_pokemon.py", line 117, in _execute_pokemon_evolve
    cache[pokemon.name] = 1
NameError: global name 'pokemon_name' is not defined```

* Stop fetching gym details (#3245)

* Checking all forts for lured pokemon (#3163)

* Fix flooding of keep_best_release (#3223)

* Fix flooding of keep_best_release

* Fix flooding of keep_best_release

* [Feature] Recycle Threshold (#2465)

* Add Threshold Option

* Add Threshold Option to Example Configs

* Add Name to Contributors

* Change config name and message

* Remove logger

* Add option to run when storage less than something

* Change Message

* Fix

* Error fixes, message improvement

* Config Changes and Remove Option

* Call heartbeat on step_walker even if speed is higher than distance (#2513)

* Return an empty list if no pokemon are available. (#3259)

The changes introduced in 4c95259 expose this bug.

* Allow UpdateTitleStats to emit events instead of rewriting the console (#3264)

* Updating our issue and PR templates to be more helpful (#3262)

* Dev (#3277)

* * adding enhanced sniping capabilities for move_to_map_pokemon

* Adding enhanced sniping capabilities for move_to_map_pokemon

* Update pgoapi to a newer version (#3241)

This should hopefully fix issues like #3181, #3098, #2874 and
potentially more.

Needs testing/verification. I am running now, but it does take about an
hour to trigger.

* Fix unexpected egg incubation retry (#3276)

incubator['used'] flag is set but not used in IncubateEggs._apply_incubators

* has_next_evolution is a function not a property (#3284)

* Powerful setup.sh (#3263)

* Rewrite run.sh

Very powerful run.sh with lots of function.
1.install(make .so)
2.update
3.config generator
4.config backup
5.run loop make it never down

It should run like 
run.sh *.json or other opinion. 
See -help.

* Update run.sh

* Update run.sh

OK problem solved

* Delete setup.py

* Rename run.sh to setup.sh

* Create run.sh

* Update setup.sh

* Update install.sh

* Update setup.sh

* Update run.sh

* Update setup.sh

Some small fix.

* Added +x to run.sh

* Added a configuration option "path_startmode" (conflict merge #2489) (#3270)

* Upstream update and merge, with path_startmode configuration

* Removed logger and fixed base task path

* As per request, path_startmode is now path_start_mode

* Removed all logging

* Adding documentation for how to use and write plugins (#3254)

* Adding documentation for how to use and write plugins

* Adding a link to the plugins docs in the Readme

* Updating link to the plugin docs in the readme

* Checking config file exists in run.sh (#3326)

* Improve and update pokemon.json (#3331)

1. Unminify for simplier edits
2. Add BaseAttack, BaseDefense, BaseStamina, CaptureRate, FleeRate, Fast/Special Attack(s)

* Made paths to .json files absolute so pokecli.py can be called from CRON (#3157)

* Made paths to .json files absolute so pokecli.py can be called from CRON

* made file paths abs in inventory

fixed incorrect dict reference, changed to .get() as felt this was intended

* Add fast & charged moves data from #2117 (originally by @iananass) (#3336)

Data for pokemon quick & slow attacks

* Upgrade pgoapi to the b4bf0e089dfe09903f8dda37dae56910e01f94cc commit(latest for now). (#3337)

* Revert "Upgrade pgoapi to the b4bf0e089dfe09903f8dda37dae56910e01f94cc commit…" (#3340)

* Added map_path configuration for move_to_map. (#3339)

* Log stats on terminal (#3312)

* added _log_on_terminal function

* Added logic to toggle terminal logging functionality from config file

* Added possibility to disable title changes, refactor code

* Refactor tuples

* Refactor ifs to clearer syntax

* changes to improve event system based on new web ui devs requests

* typo :D

* let's use dict.get a bit to avoid errors

* keeping the account in the remote command response

* Add ColoredLoggingHandler (#3198)

* Update TransferPokemon to use new Inventory Class (#3320)

* Update TransferPokemon to use new Inventory Class

* Use base_dir

* Don't release pokemon if bot is on test mode

* Some text fixes for setup.sh (#3390)

Minor text fix.

* Fix path of shells in install.sh (#3393)

* Update install.sh

Fix path

* Update setup.sh

fix path

* Update run.sh

fix path

* Fix evolution error in pokemon.json (#3344)

Fix evolution error in pokemon.json

* Improve formatting consistency in transfer_pokemon.py (#3397)

Improve formatting consistency

* Remove unnecessary file

* Put info on the next line in run.sh (#3422)

* Update setup.sh

fix typo

* Update run.sh

fix typo

* Fix Struct() argument 1 must be string, not unicode. (#3375)

* Give the possibility to disable a task without removing it (#3417)

* Give the possiblity to disable a task in config without removing it from the config file

* Put exmple only in nickname task

* Add Unit testing

* typo

* Use enabled false as exemple

* fix config creation (#3482)

Changed auth to be more specifik and added right permissions.

* Remove unused IV calculation from evolve_pokemon (#3487)

Previously IV was computed in each worker. Now its fetched from inventory. This was left over and not called in the worker at all.

* Don't show Inventory full event if we set "ignore_item_count" (#3440)

* Fix showing the date in run.sh (#3433)

fix the logic of showing the date

* Typo fix: show new catch rate after berry throw. (#3521)

* Fix stdout is not a terminal (#3511)

* Ensure recycling happens if bag is over capacity. (#3531)

Short Description:
Ensures you that item Recycling happens if you have more items than the total bag capacity.

When you level up, you are awarded items which can cause the bag to be over the capacity.

* Better inventory:  attacks & movesets,  IV CP perfection,  pokemon level,  etc.. (#3455)

* Add "level to CP multiplier" data

Data is from justinleewells/pogo-optimizer:
https://github.com/justinleewells/pogo-optimizer/blob/edd692d/data/game/level-to-cpm.json

* Many improvements & additions for the inventory logic

 - LevelToCPm, FastAttacks, ChargedAttacks, Movesets
 - More info for each pokemon:  attacks data,  percent to max cp,  IV CP perfection

* Add PyCharm/IDEA *.iml (project file) to ignored

* Fixes, improvements & refactoring for inventory.py

 - Return inadvertently deleted pieces of code (thanks to @achretien)
 - Evolution logic fixes
 - Other minor fixes
 - Moveset logic moved to Moveset class

* Fix data for pokemons & charged moves

* Inventory tests:  pokemon data,  LevelToCPm,  attacks

* Fix travis build

* Fix info for Hitmonlee & Hitmonchan

* Revert "Better inventory:  attacks & movesets,  IV CP perfection,  pokemon level,  etc.." (#3549)

* run.bat for windows (#3542)

run.bat with persistent loop

* Fix error when MoveToFort called from handle_soft_ban.py (#3500)

* Fix error when MoveToFort called from handle_soft_ban.py

* Added myself to CONTRIBUTORS.md

* Fixed list of charged attacks for Venonat (#3548) + BaseDefense/BaseStamina info fix (#3550)

* Revert "Revert "Better inventory:  attacks & movesets,  IV CP perfection,  pokemon level,  etc.." (#3549)"

This reverts commit e9b229e.

* Fix BaseDefense/BaseStamina and type info

Fixed BaseDefense/BaseStamina info (was mixed up)
Fixed type info for Mr. Mime, Clefairy, Clefable, Jigglypuff, Wigglytuff
Added check for correctness of exact CP value calculation

* Fixed list of charged attacks for Venonat

* Don't kill bot in case of unexpected moveset, use fallback + better error message

* Blacklisting tejado from getting mentioned by the mention-bot

* Moving wiki pages to docs folder

* UpdateTitleStats -> UpdateLiveStats, new stat, refactoring (#3467)

* Renamed UpdateTitleStats to UpdateLiveStats

* Cleaned worker documentation
* Added documentation for terminal_log and terminal_title
* Fixed #3312 (comment)
* Made some refactoring
* Added captures_per_hour stat that shows estimated pokemon captures per hour
* Added a captures_per_hour method in metrics.py
* Added unit tests for features added in #3312
* Added unit tests for captures_per_hour

* Avoid useless overhead when no output configured

* Added default config values in documentation

* Fixed issue with title updating on Windows

* See #3472

* Update installation docs to reflect setup sh changes (#3567)

* Fixed chmod in setup.sh (#3565)

* forgot to include the config location

* fixed setup files

* Updated readme to have better readability (#3569)

* Made the READ me more read friendly and compactor.

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update faq.md

* More documentation changes making it noob proof(er) (#3575)

* added information on what what does

* add a link to the docker hub for NAS users.

* Update Readme to point to the latest wiki and documentation (#3579)

* Improve Docker Image and `docker-compose.yml` (#3583)

- Use the non-`onbuild` variant of the python base image to better make use of Docker image caching
 - Update some volumes in `docker-compose.yml` for pogoweb

* Small fixes and improvments in setup.sh (#3585)

Adding -p to mkdir - it will not show "already exist folder" error.
And adding to backup *gpx and path files.

* Remove the "evolve_captured" flag in favor of the EvolveTask (#3530)

* Remove the "evolve_captured" flag in favor of the EvolveTask

* Remove unused event

* Warn the user instead of stopping the bot

* Improved documentation (#3604)

- Improved read flow
- Added volume sharing of cache folder

* Update installation.md (#3618)

* Update installation.md

Changed the linux Section and the Ubuntu example, for easyer access
(if anyone now how to make a code block collapsable feel free)

* Update installation.md

removed pastebin link (cause i put it there in the first place) because it's not needed
edittet linux section to Installation Linux on the example of Ubuntu (merged it with ubuntu install section)

i hope i didn't miss anything

will check on mac and windows in the next 24h. I will make a new pr for that and link it here

* moving_to_fort and moving_to_lured_fort now also emit current_position (#3614)

arrived_at_fort emits position

* Fix handle soft ban (#3629)

* Fix `MoveToFort.config` None to Empty {} dict

Whenever the bot ticks, `config.get('enable', True)` is required

* Add new contributor

* [config] new tasks in example files (#3457)

* add UpdateTitleStats to config examples

* add UpdateTitleStats to config examples

* add SleepSchedule to config examples

all config files are missing SleepSchedule from task
see https://github.com/PokemonGoF/PokemonGo-Bot/pokemongo_bot/cell_workers/sleep_schedule.py for more info
,
      {
        "type": "SleepSchedule",
        "config": {
          "time": "22:54",
          "duration":"7:46",
          "time_random_offset": "00:24",
          "duration_random_offset": "00:43"
        }
      },

* Forgot one

* fix for changes in #3467

* disable new tasks by default, removed duplicate

* Revert "moving_to_fort and moving_to_lured_fort now also emit current_position" (#3640)

* Return RUNNING if there are more forts to spin (#3412)

* Correct colored logging (#3637)

* Rewrite colered logging handler to use python logging

* Add all terminal colors and a format reset

* Add name to contributors list

* Allow to set throw quality and spin odds (#2534)

* Allow to set throw quality and spin odds

* Throw Parameter : add example

* Throw parameter example : update indentation

* sending location update if distance to move is smaller than step size

* removing useless comma

* removing old catch randomizer stuff

* Improved item recycling (#2482)

* Now recycling only if less than 5 space left in inventory
Now trying to recycle before moving to/spinning fort if bags are almost full
Refactored recycle_items

* Removed recycling before moving to/spinning fort if bags are almost full

* Removed recycling before moving to/spinning fort if bags are almost full

* Removed unused import

* Now recycling only if less than 5 space left in inventory
Now trying to recycle before moving to/spinning fort if bags are almost full
Refactored recycle_items

* Removed recycling before moving to/spinning fort if bags are almost full

* Added documentation
Replace all `logger.log` calls with events! (#2173)

* Deleted change on files not concerned

* Deleted change on files not concerned

* The inner class is now "private"

* new class to centralize inventory management

* use new inventory class in evolve_pokemon

* use new inventory to display # candy after catch

* Now using the new inventory (#2528)

* Fixed #3256

* Merge branch 'dev' of https://github.com/PokemonGoF/PokemonGo-Bot into PokemonGoF-dev

# Conflicts:
#	pokemongo_bot/cell_workers/recycle_items.py

Added methods in the inventory manager needed for the recycle_items task

* Fixed error if item_count result is false

* Now keeps track of item inventory

* Moved inventory update in request_recycle method

* Minor comment change

* Fixed not running if had more item than inventory size (#3531)

* Added to the inventory class the necessary to keep trace of items

* Now using the new inventory class properly

* Decoupled when to recycle an item from how to do it.

* Moved the recycler in the services folder

* remove Debian python-protobuf dependency (#3670)

- during installation of pgoapi, protobuf will automatically be a
dependency (confirmed with `pip show pgoapi`)

- Even for Ubuntu 16.04 LTS, python-protobuf version is
2.6.1-1.3, which is too old
  + confirmed with `apt-cache show python-protobuf`
  + see issue #1815
  (#1815)

* First basic features of the pokemon optimizer (#2956)

* catching every single pokemon nearby

* catch lured pokemon in all forts nearby

* adding run_interval to some tasks to avoid running all the time and minimum tick time of 5 seconds

Tasks inheriting from BaseTask should use `self._update_last_ran` and
`_time_to_run` if they want to implement the time based running. The
config to set a custom timer is named `run_interval`.

* added config to ignore item count for Spin and MoveToFort

this works good with the `run_interval` configuration added to
TransferPokemon and RecycleItem

* spinning all pokestops in range

* fixing loop in spin fort task

* First basic features of the pokemon optimizer

* For now, dry run only

* Add cygwin to supported platform and improved log readability (#2948)

* Add cygwin to supported platform and improved log readability

* fixed formatting

* - Add dry_run and use_lucky_egg in config
- Evolve all pokemons together and only if enough for a full lucky egg (90).
- Keep enough candies for consecutive evolutions of best pokemons
- Only evolve the lowest rank of a family

* Add lucky egg support when enough pokemon to evolve

* fixing returns

* - Support Eevee evolution scheme
- Rename "use_lucky_egg" parameter in the more accurate "evolve_only_with_lucky_egg"

* Revert "Merge remote-tracking branch 'origin/faeture/xp-improvements' into pokemon_optimizer"

This reverts commit ff1f5e4, reversing
changes made to e8fd901.

* - Fix an issue in evolve_pokemon task
- Use common inventory
- Add configuration example

* Add missing inventory refresh at the end of the process

* Add missing inventory refresh after catching a pokemon

* Add parameters "transfer" and "evolve" to activate/deactivate corresponding action. If both false, this is equivalent to a dry_run.
Add parameters "use_lucky_egg" to allow task to use a lucky egg before evolve.
Add parameter "minimum_evolve_for_lucky_egg" to add a requirement on the number of evolution before using a lucky egg.

* Move some functions around

* Default lucky egg to false + had again parameter "evolve_only_with_lucky_egg"

* Fix qn issue with egg counting
Add configuration parameter to allow customization of how pokemons are ranked in a family

* Update configuration example

* Upgrade to latest inventory

* Fix bug

* NicknamePokemon: Format iv_pct on 3 digits (#3698)

For better sorting on pokemon's name, format iv_pct on 3 digits.

* Config/encrypt fix (#3707)

* Fix typo in config

* Fix all configs

* Fixed __init__.py thanks to @hklcf

* Fixed EventManager handlers to be list instead of tuple (#3734)

* Heaps of updates to docs and other small errors in running the bot. (#3593)

* Update setup.sh

* fixed for mac creating encrypt.so

* for now just do wget or curl

* this is all in the setup.sh

* updated instructions to reflect setup.sh changes

* Update installation.md

* Update CONTRIBUTORS.md

* Update setup.sh

* Update installation.md

* Update installation.md

* Update installation.md

* added missing submodule update

* Update installation.md

* Update installation.md

* Update installation.md

* Delete install.sh

* Update .gitignore

* Update installation.md

* Update setup.sh

* Update installation.md

* Update run.sh

add `source bin/activate` if someone forget to use virtualenv.

* Update docker.md

* Modify pokemon_catch_worker.py to use Inventory class and fix #3411 (#3496)

* Fix #3411. Update inventory info before every catch try otherwise old values used

* Revert "Fix #3411. Update inventory info before every catch try otherwise old values used"

This reverts commit f7678da.

* Modify pokemon_catch_worker.py to use Inventory class

* Fix forgotten line

* Fix one more forgotten line

* Added check if we really used berry or not

* Fix KeyError in inventory.py
When we have no items of type, there are no "count" key in the dict.

* Revert "Fix KeyError in inventory.py"

This reverts commit ed2769c.

* Revert "Added check if we really used berry or not"

This reverts commit 42e9d9c.

* Revert "Fix one more forgotten line"

This reverts commit 5fda3c4.

* Revert "Fix forgotten line"

This reverts commit a8edc57.

* Revert "Modify pokemon_catch_worker.py to use Inventory class"

This reverts commit 5b6e4d3.

* Modify pokemon_catch_worker.py to use Inventory class and fix #3411

* Use Ultraball If No Other Balls (With Constraint) (#3421)

* Add Use Ultraball (#1)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add Use Ultraball if No Other Balls (#2)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Revert "Add Use Ultraball" (#4)

* Use Ultraball If No Other Balls (#3)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Remove 'use_ultraball' event.

* Remove `use_ultraball` event call

* Update & add avoid catching Pokemon if no pokeball

* Update conflict contributors

* Add get `min_ultraball_to_keep` from config file

* Improved `min_ultraball_to_keep` with condition

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Add `min_ultraball_to_keep` option

* Remove count all pokeballs

* Resolved Conflicts

* Add and Remove pokemon from the inventory cache when catch, release and evolve (#3738)

* Add and Remove pokemon from the inventory cache when catch and release

* Add dealing with evolved pokemon also

* Add the evolved pokemon

* Update configuration_files.md (#3742)

MoveToMapPokemon behavior 
related to issue #3736 (discussed with @k4n30)

* Cache recent forts (for forts.max_circle_size) (#3556)

* added bool option to cache recent forts -crf --forts.cache_recent_forts (default true)

saves recent_forts in data/recent-forts-{username}.json on spin

loads recent_forts from same file on start up

bot doesn't start a new recent_forts on every reset

* forgot contributor

* typo fix no_cached_forts

* changed all events related to caching forts to debug level

* caching of forts happens on sigterm/exception

handling of SIGTERM
-Note handling of SIGTERM in python2.7 with multi threads is not reliable.  Child thread can recieve SIGTERM and it is not handled in pokecli.py; pokecli.py continues to run.

* Update use ultraball with constraint (#3760)

* Add Use Ultraball (#1)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add Use Ultraball if No Other Balls (#2)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Revert "Add Use Ultraball" (#4)

* Use Ultraball If No Other Balls (#3)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Remove 'use_ultraball' event.

* Remove `use_ultraball` event call

* Update & add avoid catching Pokemon if no pokeball

* Update conflict contributors

* Add get `min_ultraball_to_keep` from config file

* Improved `min_ultraball_to_keep` with condition

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Add `min_ultraball_to_keep` option

* Remove count all pokeballs

* Resolved Conflicts

* Change from `items_stock` to `ball_count`

* Rewrite NicknamePokemon for new Inventory sysem + a lot of new keys for 'nickname_template' option (#3756)

* Add type information and classes

 - New classes:  Type, Types
 - Usage of new classes anywhere in the Inventory
 - Tests coverage

* Improve API for pokemons in Inventory

 - Added new class PokemonInfo for the static information loaded from json
 - API improved,  added capture_rate and flee_rate
 - All covered with tests

* Minor refactoring of inventory.py

 - Item class (moved to other instance classes) to keep file structure
 - Code style

* Rewrite NicknamePokemon to use new Inventory sysem + add a lot of new keys for 'nickname_template' option + tests & documentation

* Update documentaion for the new NicknamePokemon

* Update documentaion for the new NicknamePokemon (again :)

* Added Procfile to deploy to Heroku (#3719)

* Update installation.md (#3764)

editet Manual install Mac section

* Writing the location file to fix the web ui (#3767)

* Revert #3500 Fix error when MoveToFort called from handle_soft_ban.py (#3772)

Useless since #3629 was merged

* Clean old catch parameters (#3776)

* `catch_randomize_reticle_factor`
* `catch_randomize_spin_factor`

* Fix incorrect variable name in pokemon_catch_worker that makes bot unusable (#3780)

* added action_delay when recycling items (#3799)

* Pokemon optimizer enhancements (#3743)

* catching every single pokemon nearby

* catch lured pokemon in all forts nearby

* adding run_interval to some tasks to avoid running all the time and minimum tick time of 5 seconds

Tasks inheriting from BaseTask should use `self._update_last_ran` and
`_time_to_run` if they want to implement the time based running. The
config to set a custom timer is named `run_interval`.

* added config to ignore item count for Spin and MoveToFort

this works good with the `run_interval` configuration added to
TransferPokemon and RecycleItem

* spinning all pokestops in range

* fixing loop in spin fort task

* First basic features of the pokemon optimizer

* For now, dry run only

* Add cygwin to supported platform and improved log readability (#2948)

* Add cygwin to supported platform and improved log readability

* fixed formatting

* - Add dry_run and use_lucky_egg in config
- Evolve all pokemons together and only if enough for a full lucky egg (90).
- Keep enough candies for consecutive evolutions of best pokemons
- Only evolve the lowest rank of a family

* Add lucky egg support when enough pokemon to evolve

* fixing returns

* - Support Eevee evolution scheme
- Rename "use_lucky_egg" parameter in the more accurate "evolve_only_with_lucky_egg"

* Revert "Merge remote-tracking branch 'origin/faeture/xp-improvements' into pokemon_optimizer"

This reverts commit ff1f5e4, reversing
changes made to e8fd901.

* - Fix an issue in evolve_pokemon task
- Use common inventory
- Add configuration example

* Add missing inventory refresh at the end of the process

* Add missing inventory refresh after catching a pokemon

* Add parameters "transfer" and "evolve" to activate/deactivate corresponding action. If both false, this is equivalent to a dry_run.
Add parameters "use_lucky_egg" to allow task to use a lucky egg before evolve.
Add parameter "minimum_evolve_for_lucky_egg" to add a requirement on the number of evolution before using a lucky egg.

* Move some functions around

* Default lucky egg to false + had again parameter "evolve_only_with_lucky_egg"

* Fix qn issue with egg counting
Add configuration parameter to allow customization of how pokemons are ranked in a family

* Update configuration example

* Upgrade to latest inventory

* Fix bug

* Add parameter "use_candies_for_xp" to activate/deactivate usage of candies to maximize xp
Add comments in the configuration example

* Add dps, dps_attack and dps_defense in available sorting keys. So you can now keep the best move.
Add more comments in config
Display ncp and dps for released and evolved pokemons

* Update inventory when releasing and evolving pokemons

* Display Pokemon Bag count update

* small fix in VOLUME in Dockerfile (#3779)

* Fix looping between equidstant pokestops (#3787)

* Fix looping between equidstant pokestops

* :D

* Revert "Fix looping between equidstant pokestops" (#3848)

* configuration_files.md - Update nicknaming sample usages (#3833)

* Format iv_pct on 3 digits

For better sorting on pokemon's name, format iv_pct on 3 digits.

* Fix Nicknaming documentation sample usage

Fix some nicknaming samble usage around the iv_pct which it now
formatted on 3 digits.

* Now track inventory when spinning a fort (#3774)

* Ignoring compiled test python file of PyCharm

* Now spinning fort keeps track of cached inventory

* Now the pokemon_catch_worker keeps track of cached  ITEMS (and only items, not pokemon) inventory

* Minor improvements of the new inventory

* Fixed key error

* Minor improvements of the new inventory

* Fixed attribute non existent

* Removed duplicated import

* [Feature] added locale support for NicknamePokemon (#2539)

* added locale support for NicknamePokemon
added pokemon_de.json
beautyfied pokemon.json

* fallback to en instead of throwing runtime error

* remove log

* added locales: fr, ja, pt_br, ru, zh

* minor fix

* Windows batch files and documentation fixes (#3781)

* Update installation.md

* Create manual_installation.md

* Update installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* added windows deps

Hopefully it works I don’t have windows.

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* docker merged

Added docker too

* Update manual_installation.md

* Update installation.md

* Update installation.md

* Update installation.md

* Update installation.md

* Update installation.md

* Update installation.md

* Update manual_installation.md

* Update installation.md

* Update installation.md

* rename dir

* v2 windows bat

* Update manual_installation.md

* Update installation.md

* Update nicknaming configuration documentation (#3880)

* Format iv_pct on 3 digits

For better sorting on pokemon's name, format iv_pct on 3 digits.

* Fix Nicknaming documentation sample usage

Fix some nicknaming samble usage around the iv_pct which it now
formatted on 3 digits.

* Update nicknaming documentation

Add missing options in the nicknaming documentation.

* Updated RecycleItems config documentation (#3887)

* Updated RecycleItems config documentations

* Updated RecycleItems config documentations. Removed outdated informations
solderzzc added a commit that referenced this issue Aug 15, 2016
* Adding plugin support (#2679)

* Adding plugin support

* Adding an empty __init__.py

* Moving the base task to the project root (#2702)

* Moving the base task to the project root

* Moving the base class more

* Changing the import again

* Adding a heartbeat to the analytics (#2709)

* Adding a heartbeat to the analytics

* Heartbeat every 30 seconds, not every 5

* Don't double track clients

* Fix 'local variable 'bot' referenced before assignment'

* Providing an error if tasks don't work for the given api (#2732)

* Fix for utf8 encoding when catching lured pokemon (#2720)

* Fixing lure pokestop encoding

* fixing lure encoding

* Fix For catchable not being displayed on the web (#2719)

* Fix For catchable not being displayed on the web

* Update catch_visible_pokemon.py

* Added encrypt.so compilation process to Dockerfile (#2695)

* OS Detection for encrypt lib (#2768)

Fix 32bit check, darwin and linux use the same file

Make it a function

Check if file exists, if not show error

Define file_name first

Fix return

Check if file exists, if not show error

Print info about paths

Fix for 32/64bit detection

* Fix Typo in unexpected_response_retry (#2531)

fixes #2525 #2523

* Revert "changing license from MIT to GPLv3"

This reverts commit 69fb64f.

* When the google analytics domain is blocked the bot crashed. (#2764)

With a simple try / except this can be solved.

Fix dirty catch all

* Fixes #2698 - Prevents "Possibly searching too often" error after re-login. (#2771)

* Fixes #2698
- Added api.activate_signature call to prevent issue after re-login.
- Also replaced deprecated log call with event_manager emit to prevent exception being thrown.

* Modified to use OS detected library path as per PR #2768

* Support loading plugins from .zip files (#2766)

* Keep track of how many pokemon released (#2884)

* Setting Library path to work with encrypt.so (#2899)

Setting LD_LIBRARY_PATH on Dockerfile

* ✨ Added login and username to available stats (#2494)

Added a player_data property in PokemonGoBot to access player data from outside
Added unit tests for login and username stats
Added tests for call args when updating the window title
Added a platform-specific test for window title updating on win32 platform

* [dev] small fixes (#2912)

* Fixed emit_event typo

* Update CONTRIBUTORS.md

* Changed initialization location for "bot"

We use bot in main exception on 128

* Update pokecli.py

* Rename load_path to load_plugin (#2947)

* Adding some logic for pulling plugins from github (#2967)

* flush after title update (#2977)

* correctly re-raise exception to keep backtrace (#2944)

* Update MoveToMapPokemon to use events instead of logger. (#2913)

* Config/encrypt.so (#2964)

* Add config option for libencrypt.so

* Correctly set the config value and check for the file in said dir

* Fixed mispelling for "formatted" variable (#2984)

* Loading plugins from Github (#2992)

* Checking github plugin file existence

* Loading plugins from github

* Fixed #3000 (#3003)

Fixed syntax error on "move_to_map_pokemon.py" that makes the client crash when using this feature.

* Added MaxPotion inventory count to summary. (#3015)

Short Description: 
The Max Potion count was missing from the inventory summary.

Was #2456

* Added cleanup of download and files for encrypt.so after they are no longer needed (#3011)

* Fix bot not returning back after telepoting (#3014)

* Fix typo: last_long -> last_lon

* Whitespace cleanup

* Fix bug introduced by #3037: bot not returning back

* Fix Dockerfile installation (#3057)

* Fix for #3045 (#3055)

* Added request to check configuration (#3089)

* Fixed Dockerfile - missing \ on command lines (#3096)

* Fixed mispelling for "formatted" variable

* Docker commands missing trailing \

* Fix for FileIO slowing bot performance.This puts the map writing into a thread and makes sure it only executes  once. (#3100)

* Change word usage: "fled" to "escaped" (#3118)

"fled" is confusing to lot of people and is easily confused with pokemon vanishing. "escaped" is a better term.

* Update the example config file (#3120)

* Add config option for libencrypt.so

* Add config option for libencrypt.so

* Add config option for libencrypt.so

* Add config option for libencrypt.so

* Rename path.example.json to path.json.example

* typo: logrmation -> information (#2601)

Fix a typo. 

I assume that it was "information" initially, but became "logrmation" when someone used replace all functionality to replace all infos with logs. But I might be totally wrong at this point, idk. Just didn't like the word and wanted to fix that typo.

* Change fled to escaped (#3129)

Fix an issue after PR #3118

* When JSON parsing fails, give a rough indication of why (#3137)

* When JSON parsing fails, give a rough indication of why

* Use the official package instead of SHA1 commit

* Handle Github Download Zip Format (#3108)

* Checking github plugin file existence

* Loading plugins from github

* Starting install code for github plugins

* Updating GithubPlugin to support extracting folders

* Handling github zip formats by extracting to the correct location

* Refactor catch worker (#2527)

* refactor catch worker

* fix

* few renames

* add to contributors

* fix

* add missing behavior

* fix encounter events

* don't make events about ignored pokemon

* Added Run-Loop (#3143)

* Add files via upload

modified run script wich let you run the boot in a loop(if it crashes it restarts)

* Integreated Loop into run.sh

modified run.sh to loop the script so that even if it crashes it
automaticly restarts.

* fixing loop in spin fort task (#3165)

* Some love for the vim users (#3154)

* Updated README with link to desktop version (#3208)

* Fix for #3190 (#3197)

* MoveToMap: Add minimum balls to run (#3166)

* added config to ignore item count for Spin and MoveToFort (#3160)

* [Inventory Management] Add a central class for caching/parsing inventory & static data (#2528)

* new class to centralize inventory management

* use new inventory class in evolve_pokemon

* use new inventory to display # candy after catch

* Keeping a cache of gym information (#3236)

* New Option: "dont_nickname_favorite" (#2496)

* New Option: "dont_nickname_favorite"

This change (line 19) adds the option, that the user can choose, whether their favorite pokemons should also get a new nickname or not.

If a user want this, then he or she has to add the line ("dont_nickname_favorite" = true) after ("nickname_template": " ... ",).

* Update nickname_pokemon.py

* Update

* Put change to line 30

This reduce the reduce the runtime, because favorite pokemon won't be added to the list.

* Restart the loop when catching pokemon and there are more to catch (#3242)

* fixed NameError: global name 'pokemon_name' is not defined (#3244)

resolves ```traceback (most recent call last):
  File "pokecli.py", line 521, in <module>
    main()
  File "pokecli.py", line 95, in main
    bot.tick()
  File "/usr/src/app/pokemongo_bot/__init__.py", line 451, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/usr/src/app/pokemongo_bot/cell_workers/evolve_pokemon.py", line 38, in work
    self._execute_pokemon_evolve(pokemon, cache)
  File "/usr/src/app/pokemongo_bot/cell_workers/evolve_pokemon.py", line 117, in _execute_pokemon_evolve
    cache[pokemon.name] = 1
NameError: global name 'pokemon_name' is not defined```

* Stop fetching gym details (#3245)

* Checking all forts for lured pokemon (#3163)

* Fix flooding of keep_best_release (#3223)

* Fix flooding of keep_best_release

* Fix flooding of keep_best_release

* [Feature] Recycle Threshold (#2465)

* Add Threshold Option

* Add Threshold Option to Example Configs

* Add Name to Contributors

* Change config name and message

* Remove logger

* Add option to run when storage less than something

* Change Message

* Fix

* Error fixes, message improvement

* Config Changes and Remove Option

* Call heartbeat on step_walker even if speed is higher than distance (#2513)

* Return an empty list if no pokemon are available. (#3259)

The changes introduced in 4c95259 expose this bug.

* Allow UpdateTitleStats to emit events instead of rewriting the console (#3264)

* Updating our issue and PR templates to be more helpful (#3262)

* Dev (#3277)

* * adding enhanced sniping capabilities for move_to_map_pokemon

* Adding enhanced sniping capabilities for move_to_map_pokemon

* Update pgoapi to a newer version (#3241)

This should hopefully fix issues like #3181, #3098, #2874 and
potentially more.

Needs testing/verification. I am running now, but it does take about an
hour to trigger.

* Fix unexpected egg incubation retry (#3276)

incubator['used'] flag is set but not used in IncubateEggs._apply_incubators

* has_next_evolution is a function not a property (#3284)

* Powerful setup.sh (#3263)

* Rewrite run.sh

Very powerful run.sh with lots of function.
1.install(make .so)
2.update
3.config generator
4.config backup
5.run loop make it never down

It should run like 
run.sh *.json or other opinion. 
See -help.

* Update run.sh

* Update run.sh

OK problem solved

* Delete setup.py

* Rename run.sh to setup.sh

* Create run.sh

* Update setup.sh

* Update install.sh

* Update setup.sh

* Update run.sh

* Update setup.sh

Some small fix.

* Added +x to run.sh

* Added a configuration option "path_startmode" (conflict merge #2489) (#3270)

* Upstream update and merge, with path_startmode configuration

* Removed logger and fixed base task path

* As per request, path_startmode is now path_start_mode

* Removed all logging

* Adding documentation for how to use and write plugins (#3254)

* Adding documentation for how to use and write plugins

* Adding a link to the plugins docs in the Readme

* Updating link to the plugin docs in the readme

* Checking config file exists in run.sh (#3326)

* Improve and update pokemon.json (#3331)

1. Unminify for simplier edits
2. Add BaseAttack, BaseDefense, BaseStamina, CaptureRate, FleeRate, Fast/Special Attack(s)

* Made paths to .json files absolute so pokecli.py can be called from CRON (#3157)

* Made paths to .json files absolute so pokecli.py can be called from CRON

* made file paths abs in inventory

fixed incorrect dict reference, changed to .get() as felt this was intended

* Add fast & charged moves data from #2117 (originally by @iananass) (#3336)

Data for pokemon quick & slow attacks

* Upgrade pgoapi to the b4bf0e089dfe09903f8dda37dae56910e01f94cc commit(latest for now). (#3337)

* Revert "Upgrade pgoapi to the b4bf0e089dfe09903f8dda37dae56910e01f94cc commit…" (#3340)

* Added map_path configuration for move_to_map. (#3339)

* Log stats on terminal (#3312)

* added _log_on_terminal function

* Added logic to toggle terminal logging functionality from config file

* Added possibility to disable title changes, refactor code

* Refactor tuples

* Refactor ifs to clearer syntax

* changes to improve event system based on new web ui devs requests

* typo :D

* let's use dict.get a bit to avoid errors

* keeping the account in the remote command response

* Add ColoredLoggingHandler (#3198)

* Update TransferPokemon to use new Inventory Class (#3320)

* Update TransferPokemon to use new Inventory Class

* Use base_dir

* Don't release pokemon if bot is on test mode

* Some text fixes for setup.sh (#3390)

Minor text fix.

* Fix path of shells in install.sh (#3393)

* Update install.sh

Fix path

* Update setup.sh

fix path

* Update run.sh

fix path

* Fix evolution error in pokemon.json (#3344)

Fix evolution error in pokemon.json

* Improve formatting consistency in transfer_pokemon.py (#3397)

Improve formatting consistency

* Remove unnecessary file

* Put info on the next line in run.sh (#3422)

* Update setup.sh

fix typo

* Update run.sh

fix typo

* Fix Struct() argument 1 must be string, not unicode. (#3375)

* Give the possibility to disable a task without removing it (#3417)

* Give the possiblity to disable a task in config without removing it from the config file

* Put exmple only in nickname task

* Add Unit testing

* typo

* Use enabled false as exemple

* fix config creation (#3482)

Changed auth to be more specifik and added right permissions.

* Remove unused IV calculation from evolve_pokemon (#3487)

Previously IV was computed in each worker. Now its fetched from inventory. This was left over and not called in the worker at all.

* Don't show Inventory full event if we set "ignore_item_count" (#3440)

* Fix showing the date in run.sh (#3433)

fix the logic of showing the date

* Typo fix: show new catch rate after berry throw. (#3521)

* Fix stdout is not a terminal (#3511)

* Ensure recycling happens if bag is over capacity. (#3531)

Short Description:
Ensures you that item Recycling happens if you have more items than the total bag capacity.

When you level up, you are awarded items which can cause the bag to be over the capacity.

* Better inventory:  attacks & movesets,  IV CP perfection,  pokemon level,  etc.. (#3455)

* Add "level to CP multiplier" data

Data is from justinleewells/pogo-optimizer:
https://github.com/justinleewells/pogo-optimizer/blob/edd692d/data/game/level-to-cpm.json

* Many improvements & additions for the inventory logic

 - LevelToCPm, FastAttacks, ChargedAttacks, Movesets
 - More info for each pokemon:  attacks data,  percent to max cp,  IV CP perfection

* Add PyCharm/IDEA *.iml (project file) to ignored

* Fixes, improvements & refactoring for inventory.py

 - Return inadvertently deleted pieces of code (thanks to @achretien)
 - Evolution logic fixes
 - Other minor fixes
 - Moveset logic moved to Moveset class

* Fix data for pokemons & charged moves

* Inventory tests:  pokemon data,  LevelToCPm,  attacks

* Fix travis build

* Fix info for Hitmonlee & Hitmonchan

* Revert "Better inventory:  attacks & movesets,  IV CP perfection,  pokemon level,  etc.." (#3549)

* run.bat for windows (#3542)

run.bat with persistent loop

* Fix error when MoveToFort called from handle_soft_ban.py (#3500)

* Fix error when MoveToFort called from handle_soft_ban.py

* Added myself to CONTRIBUTORS.md

* Fixed list of charged attacks for Venonat (#3548) + BaseDefense/BaseStamina info fix (#3550)

* Revert "Revert "Better inventory:  attacks & movesets,  IV CP perfection,  pokemon level,  etc.." (#3549)"

This reverts commit e9b229e.

* Fix BaseDefense/BaseStamina and type info

Fixed BaseDefense/BaseStamina info (was mixed up)
Fixed type info for Mr. Mime, Clefairy, Clefable, Jigglypuff, Wigglytuff
Added check for correctness of exact CP value calculation

* Fixed list of charged attacks for Venonat

* Don't kill bot in case of unexpected moveset, use fallback + better error message

* Blacklisting tejado from getting mentioned by the mention-bot

* Moving wiki pages to docs folder

* UpdateTitleStats -> UpdateLiveStats, new stat, refactoring (#3467)

* Renamed UpdateTitleStats to UpdateLiveStats

* Cleaned worker documentation
* Added documentation for terminal_log and terminal_title
* Fixed #3312 (comment)
* Made some refactoring
* Added captures_per_hour stat that shows estimated pokemon captures per hour
* Added a captures_per_hour method in metrics.py
* Added unit tests for features added in #3312
* Added unit tests for captures_per_hour

* Avoid useless overhead when no output configured

* Added default config values in documentation

* Fixed issue with title updating on Windows

* See #3472

* Update installation docs to reflect setup sh changes (#3567)

* Fixed chmod in setup.sh (#3565)

* forgot to include the config location

* fixed setup files

* Updated readme to have better readability (#3569)

* Made the READ me more read friendly and compactor.

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update faq.md

* More documentation changes making it noob proof(er) (#3575)

* added information on what what does

* add a link to the docker hub for NAS users.

* Update Readme to point to the latest wiki and documentation (#3579)

* Improve Docker Image and `docker-compose.yml` (#3583)

- Use the non-`onbuild` variant of the python base image to better make use of Docker image caching
 - Update some volumes in `docker-compose.yml` for pogoweb

* Small fixes and improvments in setup.sh (#3585)

Adding -p to mkdir - it will not show "already exist folder" error.
And adding to backup *gpx and path files.

* Remove the "evolve_captured" flag in favor of the EvolveTask (#3530)

* Remove the "evolve_captured" flag in favor of the EvolveTask

* Remove unused event

* Warn the user instead of stopping the bot

* Improved documentation (#3604)

- Improved read flow
- Added volume sharing of cache folder

* Update installation.md (#3618)

* Update installation.md

Changed the linux Section and the Ubuntu example, for easyer access
(if anyone now how to make a code block collapsable feel free)

* Update installation.md

removed pastebin link (cause i put it there in the first place) because it's not needed
edittet linux section to Installation Linux on the example of Ubuntu (merged it with ubuntu install section)

i hope i didn't miss anything

will check on mac and windows in the next 24h. I will make a new pr for that and link it here

* moving_to_fort and moving_to_lured_fort now also emit current_position (#3614)

arrived_at_fort emits position

* Fix handle soft ban (#3629)

* Fix `MoveToFort.config` None to Empty {} dict

Whenever the bot ticks, `config.get('enable', True)` is required

* Add new contributor

* [config] new tasks in example files (#3457)

* add UpdateTitleStats to config examples

* add UpdateTitleStats to config examples

* add SleepSchedule to config examples

all config files are missing SleepSchedule from task
see https://github.com/PokemonGoF/PokemonGo-Bot/pokemongo_bot/cell_workers/sleep_schedule.py for more info
,
      {
        "type": "SleepSchedule",
        "config": {
          "time": "22:54",
          "duration":"7:46",
          "time_random_offset": "00:24",
          "duration_random_offset": "00:43"
        }
      },

* Forgot one

* fix for changes in #3467

* disable new tasks by default, removed duplicate

* Revert "moving_to_fort and moving_to_lured_fort now also emit current_position" (#3640)

* Return RUNNING if there are more forts to spin (#3412)

* Correct colored logging (#3637)

* Rewrite colered logging handler to use python logging

* Add all terminal colors and a format reset

* Add name to contributors list

* Allow to set throw quality and spin odds (#2534)

* Allow to set throw quality and spin odds

* Throw Parameter : add example

* Throw parameter example : update indentation

* sending location update if distance to move is smaller than step size

* removing useless comma

* removing old catch randomizer stuff

* Improved item recycling (#2482)

* Now recycling only if less than 5 space left in inventory
Now trying to recycle before moving to/spinning fort if bags are almost full
Refactored recycle_items

* Removed recycling before moving to/spinning fort if bags are almost full

* Removed recycling before moving to/spinning fort if bags are almost full

* Removed unused import

* Now recycling only if less than 5 space left in inventory
Now trying to recycle before moving to/spinning fort if bags are almost full
Refactored recycle_items

* Removed recycling before moving to/spinning fort if bags are almost full

* Added documentation
Replace all `logger.log` calls with events! (#2173)

* Deleted change on files not concerned

* Deleted change on files not concerned

* The inner class is now "private"

* new class to centralize inventory management

* use new inventory class in evolve_pokemon

* use new inventory to display # candy after catch

* Now using the new inventory (#2528)

* Fixed #3256

* Merge branch 'dev' of https://github.com/PokemonGoF/PokemonGo-Bot into PokemonGoF-dev

# Conflicts:
#	pokemongo_bot/cell_workers/recycle_items.py

Added methods in the inventory manager needed for the recycle_items task

* Fixed error if item_count result is false

* Now keeps track of item inventory

* Moved inventory update in request_recycle method

* Minor comment change

* Fixed not running if had more item than inventory size (#3531)

* Added to the inventory class the necessary to keep trace of items

* Now using the new inventory class properly

* Decoupled when to recycle an item from how to do it.

* Moved the recycler in the services folder

* remove Debian python-protobuf dependency (#3670)

- during installation of pgoapi, protobuf will automatically be a
dependency (confirmed with `pip show pgoapi`)

- Even for Ubuntu 16.04 LTS, python-protobuf version is
2.6.1-1.3, which is too old
  + confirmed with `apt-cache show python-protobuf`
  + see issue #1815
  (#1815)

* First basic features of the pokemon optimizer (#2956)

* catching every single pokemon nearby

* catch lured pokemon in all forts nearby

* adding run_interval to some tasks to avoid running all the time and minimum tick time of 5 seconds

Tasks inheriting from BaseTask should use `self._update_last_ran` and
`_time_to_run` if they want to implement the time based running. The
config to set a custom timer is named `run_interval`.

* added config to ignore item count for Spin and MoveToFort

this works good with the `run_interval` configuration added to
TransferPokemon and RecycleItem

* spinning all pokestops in range

* fixing loop in spin fort task

* First basic features of the pokemon optimizer

* For now, dry run only

* Add cygwin to supported platform and improved log readability (#2948)

* Add cygwin to supported platform and improved log readability

* fixed formatting

* - Add dry_run and use_lucky_egg in config
- Evolve all pokemons together and only if enough for a full lucky egg (90).
- Keep enough candies for consecutive evolutions of best pokemons
- Only evolve the lowest rank of a family

* Add lucky egg support when enough pokemon to evolve

* fixing returns

* - Support Eevee evolution scheme
- Rename "use_lucky_egg" parameter in the more accurate "evolve_only_with_lucky_egg"

* Revert "Merge remote-tracking branch 'origin/faeture/xp-improvements' into pokemon_optimizer"

This reverts commit ff1f5e4, reversing
changes made to e8fd901.

* - Fix an issue in evolve_pokemon task
- Use common inventory
- Add configuration example

* Add missing inventory refresh at the end of the process

* Add missing inventory refresh after catching a pokemon

* Add parameters "transfer" and "evolve" to activate/deactivate corresponding action. If both false, this is equivalent to a dry_run.
Add parameters "use_lucky_egg" to allow task to use a lucky egg before evolve.
Add parameter "minimum_evolve_for_lucky_egg" to add a requirement on the number of evolution before using a lucky egg.

* Move some functions around

* Default lucky egg to false + had again parameter "evolve_only_with_lucky_egg"

* Fix qn issue with egg counting
Add configuration parameter to allow customization of how pokemons are ranked in a family

* Update configuration example

* Upgrade to latest inventory

* Fix bug

* NicknamePokemon: Format iv_pct on 3 digits (#3698)

For better sorting on pokemon's name, format iv_pct on 3 digits.

* Config/encrypt fix (#3707)

* Fix typo in config

* Fix all configs

* Fixed __init__.py thanks to @hklcf

* Fixed EventManager handlers to be list instead of tuple (#3734)

* Heaps of updates to docs and other small errors in running the bot. (#3593)

* Update setup.sh

* fixed for mac creating encrypt.so

* for now just do wget or curl

* this is all in the setup.sh

* updated instructions to reflect setup.sh changes

* Update installation.md

* Update CONTRIBUTORS.md

* Update setup.sh

* Update installation.md

* Update installation.md

* Update installation.md

* added missing submodule update

* Update installation.md

* Update installation.md

* Update installation.md

* Delete install.sh

* Update .gitignore

* Update installation.md

* Update setup.sh

* Update installation.md

* Update run.sh

add `source bin/activate` if someone forget to use virtualenv.

* Update docker.md

* Modify pokemon_catch_worker.py to use Inventory class and fix #3411 (#3496)

* Fix #3411. Update inventory info before every catch try otherwise old values used

* Revert "Fix #3411. Update inventory info before every catch try otherwise old values used"

This reverts commit f7678da.

* Modify pokemon_catch_worker.py to use Inventory class

* Fix forgotten line

* Fix one more forgotten line

* Added check if we really used berry or not

* Fix KeyError in inventory.py
When we have no items of type, there are no "count" key in the dict.

* Revert "Fix KeyError in inventory.py"

This reverts commit ed2769c.

* Revert "Added check if we really used berry or not"

This reverts commit 42e9d9c.

* Revert "Fix one more forgotten line"

This reverts commit 5fda3c4.

* Revert "Fix forgotten line"

This reverts commit a8edc57.

* Revert "Modify pokemon_catch_worker.py to use Inventory class"

This reverts commit 5b6e4d3.

* Modify pokemon_catch_worker.py to use Inventory class and fix #3411

* Use Ultraball If No Other Balls (With Constraint) (#3421)

* Add Use Ultraball (#1)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add Use Ultraball if No Other Balls (#2)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Revert "Add Use Ultraball" (#4)

* Use Ultraball If No Other Balls (#3)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Remove 'use_ultraball' event.

* Remove `use_ultraball` event call

* Update & add avoid catching Pokemon if no pokeball

* Update conflict contributors

* Add get `min_ultraball_to_keep` from config file

* Improved `min_ultraball_to_keep` with condition

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Add `min_ultraball_to_keep` option

* Remove count all pokeballs

* Resolved Conflicts

* Add and Remove pokemon from the inventory cache when catch, release and evolve (#3738)

* Add and Remove pokemon from the inventory cache when catch and release

* Add dealing with evolved pokemon also

* Add the evolved pokemon

* Update configuration_files.md (#3742)

MoveToMapPokemon behavior 
related to issue #3736 (discussed with @k4n30)

* Cache recent forts (for forts.max_circle_size) (#3556)

* added bool option to cache recent forts -crf --forts.cache_recent_forts (default true)

saves recent_forts in data/recent-forts-{username}.json on spin

loads recent_forts from same file on start up

bot doesn't start a new recent_forts on every reset

* forgot contributor

* typo fix no_cached_forts

* changed all events related to caching forts to debug level

* caching of forts happens on sigterm/exception

handling of SIGTERM
-Note handling of SIGTERM in python2.7 with multi threads is not reliable.  Child thread can recieve SIGTERM and it is not handled in pokecli.py; pokecli.py continues to run.

* Update use ultraball with constraint (#3760)

* Add Use Ultraball (#1)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add Use Ultraball if No Other Balls (#2)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Revert "Add Use Ultraball" (#4)

* Use Ultraball If No Other Balls (#3)

* Add `use_ultraball` event to Event Manager

* Add use ultraball if pokeball + greatball = 0

* Add New Contributor

* Remove 'use_ultraball' event.

* Remove `use_ultraball` event call

* Update & add avoid catching Pokemon if no pokeball

* Update conflict contributors

* Add get `min_ultraball_to_keep` from config file

* Improved `min_ultraball_to_keep` with condition

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Added `min_ultraball_to_keep` option

* Add `min_ultraball_to_keep` option

* Remove count all pokeballs

* Resolved Conflicts

* Change from `items_stock` to `ball_count`

* Rewrite NicknamePokemon for new Inventory sysem + a lot of new keys for 'nickname_template' option (#3756)

* Add type information and classes

 - New classes:  Type, Types
 - Usage of new classes anywhere in the Inventory
 - Tests coverage

* Improve API for pokemons in Inventory

 - Added new class PokemonInfo for the static information loaded from json
 - API improved,  added capture_rate and flee_rate
 - All covered with tests

* Minor refactoring of inventory.py

 - Item class (moved to other instance classes) to keep file structure
 - Code style

* Rewrite NicknamePokemon to use new Inventory sysem + add a lot of new keys for 'nickname_template' option + tests & documentation

* Update documentaion for the new NicknamePokemon

* Update documentaion for the new NicknamePokemon (again :)

* Added Procfile to deploy to Heroku (#3719)

* Update installation.md (#3764)

editet Manual install Mac section

* Writing the location file to fix the web ui (#3767)

* Revert #3500 Fix error when MoveToFort called from handle_soft_ban.py (#3772)

Useless since #3629 was merged

* Clean old catch parameters (#3776)

* `catch_randomize_reticle_factor`
* `catch_randomize_spin_factor`

* Fix incorrect variable name in pokemon_catch_worker that makes bot unusable (#3780)

* added action_delay when recycling items (#3799)

* Pokemon optimizer enhancements (#3743)

* catching every single pokemon nearby

* catch lured pokemon in all forts nearby

* adding run_interval to some tasks to avoid running all the time and minimum tick time of 5 seconds

Tasks inheriting from BaseTask should use `self._update_last_ran` and
`_time_to_run` if they want to implement the time based running. The
config to set a custom timer is named `run_interval`.

* added config to ignore item count for Spin and MoveToFort

this works good with the `run_interval` configuration added to
TransferPokemon and RecycleItem

* spinning all pokestops in range

* fixing loop in spin fort task

* First basic features of the pokemon optimizer

* For now, dry run only

* Add cygwin to supported platform and improved log readability (#2948)

* Add cygwin to supported platform and improved log readability

* fixed formatting

* - Add dry_run and use_lucky_egg in config
- Evolve all pokemons together and only if enough for a full lucky egg (90).
- Keep enough candies for consecutive evolutions of best pokemons
- Only evolve the lowest rank of a family

* Add lucky egg support when enough pokemon to evolve

* fixing returns

* - Support Eevee evolution scheme
- Rename "use_lucky_egg" parameter in the more accurate "evolve_only_with_lucky_egg"

* Revert "Merge remote-tracking branch 'origin/faeture/xp-improvements' into pokemon_optimizer"

This reverts commit ff1f5e4, reversing
changes made to e8fd901.

* - Fix an issue in evolve_pokemon task
- Use common inventory
- Add configuration example

* Add missing inventory refresh at the end of the process

* Add missing inventory refresh after catching a pokemon

* Add parameters "transfer" and "evolve" to activate/deactivate corresponding action. If both false, this is equivalent to a dry_run.
Add parameters "use_lucky_egg" to allow task to use a lucky egg before evolve.
Add parameter "minimum_evolve_for_lucky_egg" to add a requirement on the number of evolution before using a lucky egg.

* Move some functions around

* Default lucky egg to false + had again parameter "evolve_only_with_lucky_egg"

* Fix qn issue with egg counting
Add configuration parameter to allow customization of how pokemons are ranked in a family

* Update configuration example

* Upgrade to latest inventory

* Fix bug

* Add parameter "use_candies_for_xp" to activate/deactivate usage of candies to maximize xp
Add comments in the configuration example

* Add dps, dps_attack and dps_defense in available sorting keys. So you can now keep the best move.
Add more comments in config
Display ncp and dps for released and evolved pokemons

* Update inventory when releasing and evolving pokemons

* Display Pokemon Bag count update

* small fix in VOLUME in Dockerfile (#3779)

* Fix looping between equidstant pokestops (#3787)

* Fix looping between equidstant pokestops

* :D

* Revert "Fix looping between equidstant pokestops" (#3848)

* configuration_files.md - Update nicknaming sample usages (#3833)

* Format iv_pct on 3 digits

For better sorting on pokemon's name, format iv_pct on 3 digits.

* Fix Nicknaming documentation sample usage

Fix some nicknaming samble usage around the iv_pct which it now
formatted on 3 digits.

* Now track inventory when spinning a fort (#3774)

* Ignoring compiled test python file of PyCharm

* Now spinning fort keeps track of cached inventory

* Now the pokemon_catch_worker keeps track of cached  ITEMS (and only items, not pokemon) inventory

* Minor improvements of the new inventory

* Fixed key error

* Minor improvements of the new inventory

* Fixed attribute non existent

* Removed duplicated import

* [Feature] added locale support for NicknamePokemon (#2539)

* added locale support for NicknamePokemon
added pokemon_de.json
beautyfied pokemon.json

* fallback to en instead of throwing runtime error

* remove log

* added locales: fr, ja, pt_br, ru, zh

* minor fix

* Windows batch files and documentation fixes (#3781)

* Update installation.md

* Create manual_installation.md

* Update installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* added windows deps

Hopefully it works I don’t have windows.

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* Update manual_installation.md

* docker merged

Added docker too

* Update manual_installation.md

* Update installation.md

* Update installation.md

* Update installation.md

* Update installation.md

* Update installation.md

* Update installation.md

* Update manual_installation.md

* Update installation.md

* Update installation.md

* rename dir

* v2 windows bat

* Update manual_installation.md

* Update installation.md

* Update nicknaming configuration documentation (#3880)

* Format iv_pct on 3 digits

For better sorting on pokemon's name, format iv_pct on 3 digits.

* Fix Nicknaming documentation sample usage

Fix some nicknaming samble usage around the iv_pct which it now
formatted on 3 digits.

* Update nicknaming documentation

Add missing options in the nicknaming documentation.

* Updated RecycleItems config documentation (#3887)

* Updated RecycleItems config documentations

* Updated RecycleItems config documentations. Removed outdated informations

* Update README.md (#3895)

Clarified support channels, added feature hub details

* Update setup.sh (#3836)

Support more system.
A user-friendly way to use virtualenv.

* fix divide by zero bug; add distance logging when speed == 0 (#3819)

* fix divide by zero bug; add distance logging when speed == 0

* refactor last position distance; add rules to .gitignore

* remove file user_web_catchable that was added by mistake

* Fix items discarding smiling message (#3790)

* Improved documentation (#3921)

* Added documentation to the inventory

* Added documentation to the inventory

* Added/improved documentation

* Fix wrong teleport message (#3935)

* fix wrong log message

* fix log message- Walking

* Nickname Pokemon IVs in hex (0..F) #3803 (#3869)

* pokemon IVs in HEX

* using regex to convert only keys to lowercase, leaving the format specifier alone

* Detect and alert for permaban (#3944)

* #3932 - Fix nicknaming task exception with non ascii characters (#3951)

Fix ticket #3932 when the nicknaming task throw an exception with
pokemon's name containing non ascii characters.

* fixes buggy behaviour in for loop when removing forts with timeout from forts (#3936)

* added account name to WindowTitle (#3876)

* add account name to WindowTitle

add account name to the WindowTitle in "UpdateLiveStats" task, easier to manage multiple bots and their outputs.

* Update config.json.example

* updated

Removed blank space & line

* Refactored SIGINT handler so it catches SIGINT during relog loop (#3867)

* Refactored SIGINT handler so it catches SIGINT during relog loop

* typo fix

* recycle items in cascading (#3930)

* recycle items in cascading

* revert the changes of Improved documentation

* revert the missing change in Improved documentation

* fix incorrect maximum variables issue

* Removed unnecessary parameters

* updates removed unnecessary parameters

* If we think we are softbanned then set the flag so we can get unbanned (#3847)

* Revert "recycle items in cascading" (#3956)
alexyaoyang pushed a commit that referenced this issue Sep 1, 2016
* Update merge (#1)

* Expand simple logging options (#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (#4845)

Fixed an faulty character

* fix incubator logic (#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (#4854)

* corrected logic to respect snipe = true (#4855)

* Revert "corrected logic to respect snipe = true" (#4857)

* dont forget to update the docs when adding config changes... (#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (#4909)

* add telegram check messages interval (#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for #4718 (#4924)

* Add except variable

* Add except variable

* Fix filter (#4925)

* improve docker pull speed (#4899)

* Update inventory.py (#4928)

FIX: #4926

* fixed a runtime error caused by incorrect imports (#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (#4960)

* Compatiable with old protocol define in map-chat.

* Update merge (#2)

* Expand simple logging options (#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (#4845)

Fixed an faulty character

* fix incubator logic (#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (#4854)

* corrected logic to respect snipe = true (#4855)

* Revert "corrected logic to respect snipe = true" (#4857)

* dont forget to update the docs when adding config changes... (#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (#4909)

* add telegram check messages interval (#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for #4718 (#4924)

* Add except variable

* Add except variable

* Fix filter (#4925)

* improve docker pull speed (#4899)

* Update inventory.py (#4928)

FIX: #4926

* fixed a runtime error caused by incorrect imports (#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (#4960)

* Compatiable with old protocol define in map-chat.

* Provided a default for max_walking_distance and max_sniping_distance in
order to avoid unhandled exceptions

* Made sure nicknaming only waits if real api-relevant action was taken.
rawgni added a commit to rawgni/PokemonGo-Bot that referenced this issue Sep 1, 2016
Fix nickname (PokemonGoF#5031)

* Update merge (PokemonGoF#1)

* Expand simple logging options (PokemonGoF#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (PokemonGoF#4845)

Fixed an faulty character

* fix incubator logic (PokemonGoF#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (PokemonGoF#4854)

* corrected logic to respect snipe = true (PokemonGoF#4855)

* Revert "corrected logic to respect snipe = true" (PokemonGoF#4857)

* dont forget to update the docs when adding config changes... (PokemonGoF#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (PokemonGoF#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (PokemonGoF#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (PokemonGoF#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (PokemonGoF#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (PokemonGoF#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (PokemonGoF#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (PokemonGoF#4891)

* execute setup.sh -u if there is a need to (PokemonGoF#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (PokemonGoF#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (PokemonGoF#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (PokemonGoF#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (PokemonGoF#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (PokemonGoF#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (PokemonGoF#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (PokemonGoF#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (PokemonGoF#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (PokemonGoF#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (PokemonGoF#4891)

* execute setup.sh -u if there is a need to (PokemonGoF#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (PokemonGoF#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (PokemonGoF#4909)

* add telegram check messages interval (PokemonGoF#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (PokemonGoF#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (PokemonGoF#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for PokemonGoF#4718 (PokemonGoF#4924)

* Add except variable

* Add except variable

* Fix filter (PokemonGoF#4925)

* improve docker pull speed (PokemonGoF#4899)

* Update inventory.py (PokemonGoF#4928)

FIX: PokemonGoF#4926

* fixed a runtime error caused by incorrect imports (PokemonGoF#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (PokemonGoF#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (PokemonGoF#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (PokemonGoF#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (PokemonGoF#4960)

* Compatiable with old protocol define in map-chat.

* Update merge (PokemonGoF#2)

* Expand simple logging options (PokemonGoF#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (PokemonGoF#4845)

Fixed an faulty character

* fix incubator logic (PokemonGoF#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (PokemonGoF#4854)

* corrected logic to respect snipe = true (PokemonGoF#4855)

* Revert "corrected logic to respect snipe = true" (PokemonGoF#4857)

* dont forget to update the docs when adding config changes... (PokemonGoF#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (PokemonGoF#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (PokemonGoF#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (PokemonGoF#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (PokemonGoF#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (PokemonGoF#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (PokemonGoF#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (PokemonGoF#4891)

* execute setup.sh -u if there is a need to (PokemonGoF#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (PokemonGoF#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (PokemonGoF#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (PokemonGoF#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (PokemonGoF#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (PokemonGoF#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (PokemonGoF#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (PokemonGoF#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (PokemonGoF#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (PokemonGoF#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (PokemonGoF#4891)

* execute setup.sh -u if there is a need to (PokemonGoF#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (PokemonGoF#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (PokemonGoF#4909)

* add telegram check messages interval (PokemonGoF#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (PokemonGoF#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (PokemonGoF#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for PokemonGoF#4718 (PokemonGoF#4924)

* Add except variable

* Add except variable

* Fix filter (PokemonGoF#4925)

* improve docker pull speed (PokemonGoF#4899)

* Update inventory.py (PokemonGoF#4928)

FIX: PokemonGoF#4926

* fixed a runtime error caused by incorrect imports (PokemonGoF#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (PokemonGoF#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (PokemonGoF#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (PokemonGoF#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (PokemonGoF#4960)

* Compatiable with old protocol define in map-chat.

* Provided a default for max_walking_distance and max_sniping_distance in
order to avoid unhandled exceptions

* Made sure nicknaming only waits if real api-relevant action was taken.
solderzzc pushed a commit that referenced this issue Sep 1, 2016
* Expand simple logging options (#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (#4845)

Fixed an faulty character

* fix incubator logic (#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (#4854)

* corrected logic to respect snipe = true (#4855)

* Revert "corrected logic to respect snipe = true" (#4857)

* dont forget to update the docs when adding config changes... (#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (#4909)

* add telegram check messages interval (#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for #4718 (#4924)

* Add except variable

* Add except variable

* Fix filter (#4925)

* improve docker pull speed (#4899)

* Update inventory.py (#4928)

FIX: #4926

* fixed a runtime error caused by incorrect imports (#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (#4960)

* Compatiable with old protocol define in map-chat.
DBa2016 pushed a commit that referenced this issue Sep 27, 2016
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this issue Sep 28, 2016
Added remaining time to POI label
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this issue Sep 28, 2016
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this issue Sep 28, 2016
* Added Auto-refresh - Initial

New Pokemons being pushed to the map each 10 seconds.
Old Pokemons being removed from the map during push.

* Update app.py

* Merge fix

bug

* Update map.js

* Update map.html

* Update app.py

* stamp param fix

* Update map.html
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this issue Sep 28, 2016
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this issue Sep 28, 2016
Jcolomar pushed a commit that referenced this issue May 9, 2017
MerlionRock pushed a commit that referenced this issue Jul 18, 2017
Update DEV: Basic gym support
nbq pushed a commit that referenced this issue Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant